1

I'm working in a Salesforce APP called Skuid. I can only style by CSS / Javascript and I don't have access to the HTML.

Anyway I'm designing a contact form and this is how the individual fields are styled:

<div class="nx-field nx-modified required" data-uid="20"><textarea></textarea></div>

They each have a unique "data-uid" number.

How can I target data-uid="20" in CSS? Any way to do that? I searched around and can't find anything.

Please help.

Thanks!

1 Answers1

4

Use the CSS attribute selector syntax:

div[data-uid="20"] {
    background:red;
}
<div class="nx-field nx-modified required" data-uid="20">
    <textarea></textarea>
</div>
<div class="nx-field nx-modified required" data-uid="21">
    <textarea></textarea>
</div>
j08691
  • 197,815
  • 30
  • 248
  • 265