Apply CSS to a single Table Filter?

  • 1
  • Question
  • Updated 4 years ago
  • Answered
Would it be possible to apply CSS to a single Table Filter, leaving the others with default settings? I couldn't find anywhere to apply a UniqueID to a single filter. In the attached image, I have a filter on the left which turns all the other conditions off. It would be good to make this one stand out from the rest to draw the User's attention to it.

Photo of Greg Jarrett

Greg Jarrett

  • 3,496 Points 3k badge 2x thumb

Posted 4 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
You are correct,  you cannot apply a unique id to a single filter element. But you can use CSS selectors to apply a custom styling to the first child element of a group.  I added the following css to my page: 

.nx-conditioncontainer .nx-actionselect:first-child 
{
background: red;
}

And got this effect: 




Cheers! 

See here: http://css-tricks.com/almanac/selectors/f/first-child/  for explanations and browser compatibility.