March 2nd, 2017, 08:23 AM
select, option background color
I am trying to highlight certain <select> <options> and this is what I have
which works with Firefox but not with Chrome.
<option value="">Choose a Name</option>
<option style="background-color:Silver; " value="evan">Evan</option>
<option style="background-color:Silver; " value="samantha">Samantha</option>
March 2nd, 2017, 09:45 AM
Working for me. Use the dev tools to see what Chrome is doing with the style - maybe it's being overridden by something.
March 3rd, 2017, 09:19 AM
Is there a way to assign the <select> tag to something that will disable any predefined css?
Originally Posted by requinix
March 3rd, 2017, 10:04 AM
It's not possible. Even if it were, you wouldn't want to do that: the predefined CSS is what makes everything work, and without it you'd have nothing.
But the predefined stuff isn't at fault here.