Selected Input color

Discussion in 'HTML' started by Paul Nash, Oct 6, 2004.

  1. Paul Nash

    Paul Nash Guest

    I am trying to color coordinate my wenpage. But I cant work out how to
    specify the color of a selected option. I always get white color on
    dark-blue background. How do I change this ?
     
    Paul Nash, Oct 6, 2004
    #1
    1. Advertising

  2. Paul Nash wrote:
    > I am trying to color coordinate my wenpage. But I cant work out how to
    > specify the color of a selected option. I always get white color on
    > dark-blue background. How do I change this ?


    You mean like this?
    <head>
    <style type="text/css">
    <!--
    optgroup {
    color: #FFF;
    background: #000;
    }
    option {
    color: #000;
    background: #FF6;
    }
    -->
    </style>
    </head>
    <body>
    <fieldset><legend>Beers of the World</legend><select multiple>
    <optgroup label="Campbelltown">
    <option value="sb21">Springbank 21 yr.</option>
    <option value="sb15">Springbank 15 yr.</option>
    <option value="sb12">Springbank 12 yr.</option>
    <option value="glsc">Glen Scotia</option>
    </optgroup>
    <optgroup label="Highland">
    <option value="rlsr">Royal Lochnager Selected Reserve</option>
    <option value="ob14">Oban 14 yr.</option>
    <option value="ldb10">Lock Dhu Black 10 yr.</option>
    <option value="hp12">Highland Park 12 yr.</option>
    <option value="gm71">Glenmorangie 1971 Vintage.</option>
    </optgroup>
    </fieldset></select>
    </body>
    --
    Edwin van der Vaart
    http://www.semi-conductor.nl/ Links to Semiconductors sites
    http://www.evandervaart.nl/ Under construction
     
    Edwin van der Vaart, Oct 6, 2004
    #2
    1. Advertising

  3. Paul Nash

    brucie Guest

    In alt.html Paul Nash said:

    > I am trying to color coordinate my wenpage. But I cant work out how to
    > specify the color of a selected option.


    some browsers like the style on the <select> and some like it on the
    <option> so do it on both to cover your sexy little bottom:

    select,option{color:lime;background:red;}

    browser support varies and is also effected by user preferences

    > I always get white color on dark-blue background.


    they're your system default colors

    --
    l i t t l e v o i c e s m a k e m e
     
    brucie, Oct 6, 2004
    #3
  4. Paul Nash

    Steve Pugh Guest

    On Thu, 7 Oct 2004 09:50:08 +1300, "Paul Nash" <>
    wrote:

    >I am trying to color coordinate my wenpage. But I cant work out how to
    >specify the color of a selected option. I always get white color on
    >dark-blue background. How do I change this ?


    The CSS3 :checked selector might work, one day in some browsers.
    But right now, no you can't do anything about it.

    Steve
     
    Steve Pugh, Oct 6, 2004
    #4
  5. "Steve Pugh" <> skrev i meddelandet
    news:p...
    > On Thu, 7 Oct 2004 09:50:08 +1300, "Paul Nash" <>
    > wrote:
    >
    > >I am trying to color coordinate my wenpage. But I cant work out how to
    > >specify the color of a selected option. I always get white color on
    > >dark-blue background. How do I change this ?

    >
    > The CSS3 :checked selector might work, one day in some browsers.
    > But right now, no you can't do anything about it.
    >
    > Steve


    When is CSS3 likely to begin working? In one year?

    --
    Luigi ( un italiano che vive in Svezia)
    http://www.italymap.dk/sv/italien-karta.html
    http://www.scaiecat-spa-gigi.com/sv/presentartiklar-art.v67.html
     
    Luigi Donatello Asero, Oct 6, 2004
    #5
  6. Paul Nash

    Steve Pugh Guest

    "Luigi Donatello Asero" <> wrote:
    >"Steve Pugh" <> skrev i meddelandet
    >news:p...
    >>
    >> The CSS3 :checked selector might work, one day in some browsers.
    >> But right now, no you can't do anything about it.

    >
    >When is CSS3 likely to begin working? In one year?


    Some parts of it work now in some browsers.
    Some parts will work next year in some browsers.
    Some parts will work in two years time in some browsers.
    Some parts wlll never work in some browsers.

    For various values of 'some'.

    Which parts are you interested in?

    Steve
     
    Steve Pugh, Oct 6, 2004
    #6
  7. "Steve Pugh" <> skrev i meddelandet
    news:...
    > "Luigi Donatello Asero" <> wrote:
    > >"Steve Pugh" <> skrev i meddelandet
    > >news:p...
    > >>
    > >> The CSS3 :checked selector might work, one day in some browsers.
    > >> But right now, no you can't do anything about it.

    > >
    > >When is CSS3 likely to begin working? In one year?

    >
    > Some parts of it work now in some browsers.
    > Some parts will work next year in some browsers.
    > Some parts will work in two years time in some browsers.
    > Some parts wlll never work in some browsers.
    >
    > For various values of 'some'.
    >
    > Which parts are you interested in?


    > Steve


    Are there any parts which are likely to be rendered by all or at least most
    browsers within one year?
    Which ones?

    --
    Luigi ( un italiano che vive in Svezia)
    http://www.italymap.dk/sv/italien-karta.html
    http://www.scaiecat-spa-gigi.com/it/svezia.html
     
    Luigi Donatello Asero, Oct 6, 2004
    #7
  8. Paul Nash

    Steve Pugh Guest

    On Wed, 06 Oct 2004 21:27:55 GMT, "Luigi Donatello Asero"
    <> wrote:
    >"Steve Pugh" <> skrev i meddelandet
    >news:...
    >> "Luigi Donatello Asero" <> wrote:
    >> >
    >> >When is CSS3 likely to begin working? In one year?

    >>
    >> Some parts of it work now in some browsers.
    >> Some parts will work next year in some browsers.
    >> Some parts will work in two years time in some browsers.
    >> Some parts wlll never work in some browsers.
    >>
    >> For various values of 'some'.
    >>
    >> Which parts are you interested in?

    >
    >Are there any parts which are likely to be rendered by all or at least most
    >browsers within one year?


    Yes.

    >Which ones?


    The parts that are the same as CSS1 and 2.

    Remember that CSS3 is still a work in progress. The spec is finished
    yet so you can't expect browser support, especially as the development
    of the world's most popular browser is frozen at 2001 levels and is
    likely to stay frozen for there for another couple of years.

    Some parts of the spec are more stable than others (selectors being
    one of the stable parts) and support is starting to appear in browsers
    that are under active development.

    Steve
     
    Steve Pugh, Oct 7, 2004
    #8
  9. Paul Nash

    Steve Pugh Guest

    On Thu, 07 Oct 2004 07:31:57 +0100, Steve Pugh <> wrote:

    >Remember that CSS3 is still a work in progress. The spec is finished


    .... is NOT finished ...

    Sigh

    Steve
     
    Steve Pugh, Oct 7, 2004
    #9
  10. Paul Nash

    SpaceGirl Guest

    brucie wrote:

    > some browsers like the style on the <select> and some like it on the
    > <option> so do it on both to cover your sexy little bottom:
    >
    > select,option{color:lime;background:red;}


    lime and red...! gorgeous!

    *throws up*

    --


    x theSpaceGirl (miranda)

    # lead designer @ http://www.dhnewmedia.com #
    # remove NO SPAM to email, or use form on website #
     
    SpaceGirl, Oct 7, 2004
    #10
  11. Paul Nash

    brucie Guest

    In alt.html SpaceGirl said:

    >> select,option{color:lime;background:red;}


    > lime and red...! gorgeous!


    mommy let me pick the colors all by myself!

    > *throws up*


    carrots?! but you don't even like carrots!

    --
    i t ' s t h e l i t t l e v o i c e s
     
    brucie, Oct 7, 2004
    #11
    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. ashutosh
    Replies:
    3
    Views:
    9,055
    Andrew Thompson
    Jun 16, 2005
  2. Iain
    Replies:
    3
    Views:
    973
  3. Nathan Sokalski
    Replies:
    0
    Views:
    653
    Nathan Sokalski
    Oct 5, 2008
  4. John
    Replies:
    5
    Views:
    1,037
    dorayme
    Mar 1, 2010
  5. Kamaljeet Saini
    Replies:
    0
    Views:
    506
    Kamaljeet Saini
    Feb 13, 2009
Loading...

Share This Page