Background colour of Drop down list entry's?

Discussion in 'HTML' started by harry, May 31, 2004.

  1. harry

    harry Guest

    A client wants a drop down box on a web page that contains 3 list items
    "red", "green" & "amber" - is it possible to set the background colour for
    each individual item? - any ideas before I tell them no?


    harry, May 31, 2004
    1. Advertisements

  2. option.someClass { background-color: #aff; color: #ffa; }

    - browser support is limited.
    David Dorward, May 31, 2004
    1. Advertisements

  3. harry

    rf Guest

    Tell him no.

    rf, May 31, 2004
  4. harry

    brucie Guest

    in post: <

    <option id="o1">blah 1</option>
    <option id="o2">blah 2</option>
    <option id="o3">blah 3</option>

    etc etc

    browser support varies. user options may also disallow styling of form
    brucie, May 31, 2004
  5. harry

    harry Guest

    thanks chaps, works perfectly!

    harry, May 31, 2004
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.