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?

    cheers

    harry
     
    harry, May 31, 2004
    #1
    1. Advertising

  2. harry wrote:

    > 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?


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

    - browser support is limited.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, May 31, 2004
    #2
    1. Advertising

  3. harry

    rf Guest

    "harry" <> wrote in message
    news:p8Duc.46$...
    > 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?


    Tell him no.

    Cheers
    Richard.
     
    rf, May 31, 2004
    #3
  4. harry

    brucie Guest

    in post: <news:p8Duc.46$>
    harry <> said:

    > 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?


    #o1{background:red;}
    #o2{background:green;}
    #o3{background:#FFEA76;}

    <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
    elements.


    --
    b r u c i e
     
    brucie, May 31, 2004
    #4
  5. harry

    harry Guest

    thanks chaps, works perfectly!

    "David Dorward" <> wrote in message
    news:c9ev63$q46$2$...
    > harry wrote:
    >
    > > 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?

    >
    > option.someClass { background-color: #aff; color: #ffa; }
    >
    > - browser support is limited.
    >
    > --
    > David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    > Home is where the ~/.bashrc is
     
    harry, May 31, 2004
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SirPoonga
    Replies:
    2
    Views:
    783
    Ben Strackany
    Jan 7, 2005
  2. weiwei
    Replies:
    0
    Views:
    1,035
    weiwei
    Jan 5, 2007
  3. msimmons
    Replies:
    0
    Views:
    498
    msimmons
    Jul 16, 2009
  4. Dj Frenzy
    Replies:
    3
    Views:
    314
    Robert
    Feb 10, 2004
  5. Replies:
    5
    Views:
    284
Loading...

Share This Page