Css to change color of Picklist text in a specific column

  • 1
  • Question
  • Updated 3 years ago
  • Answered
Hello,

I'm trying to get the text from picklist fields, to change color on a specific column via CSS

I tried with following css, to highlight  and it worked, the whole column was highlighted red, but my text disappeared...

table.nx-skootable-data tbody tr td:nth-child(4) {
    background-color: #f8f8f8;
}

I rather change color of text than highlight whole cell if possible

tried this , but text disappeared, as well

table.nx-skootable-data tbody tr td:nth-child(4) {
    background-color: #f8f8f8;
}

but not sure if I'm doing something wrong, or because it's picklist...

Pls help


Thx
Photo of Dave

Dave

  • 5,538 Points 5k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Try this?

table.nx-skootable-data tbody tr td:nth-child(4) .nx-field {
    color: #f8f8f8;
}
Photo of Dave

Dave

  • 5,538 Points 5k badge 2x thumb
Thank you Matt, that worked.

is there any way i can apply this only to a specific table?

As i did not assign a field rendered to any field, but now all tables show 1 column in red


Thx
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Find the DOM Id that is assigned to the particular table you are after and add it to the beginning of your css statement.  Like this

#tableId table.nx-skootable-data tbody tr td:nth-child(4) .nx-field {
    color: #f8f8f8;
}