#1
  1. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Posts
    754
    Rep Power
    123

    select, option background color


    I am trying to highlight certain <select> <options> and this is what I have
    PHP Code:
    <select name="my_select">
    <
    option value="">Choose a Name</option>
    <
    option  style="background-color:Silver; " value="evan">Evan</option>
    <
    option   value="dan">Dan</option>
    <
    option   value="diane">Diane</option>
    <
    option  style="background-color:Silver; " value="samantha">Samantha</option
    which works with Firefox but not with Chrome.
    Any ideas?
  2. #2
  3. Lazy Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    16,382
    Rep Power
    9645
    Working for me. Use the dev tools to see what Chrome is doing with the style - maybe it's being overridden by something.
  4. #3
  5. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Posts
    754
    Rep Power
    123
    Is there a way to assign the <select> tag to something that will disable any predefined css?

    Originally Posted by requinix
    Working for me. Use the dev tools to see what Chrome is doing with the style - maybe it's being overridden by something.
  6. #4
  7. Lazy Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    16,382
    Rep Power
    9645
    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.

IMN logo majestic logo threadwatch logo seochat tools logo