Selected Input color

P

Paul Nash

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

Edwin van der Vaart

Paul said:
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>
 
B

brucie

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
 
S

Steve Pugh

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
 
L

Luigi Donatello Asero

Steve Pugh said:
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?
 
S

Steve Pugh

Luigi Donatello Asero said:
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
 
L

Luigi Donatello Asero

Steve Pugh said:
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?
Which ones?
 
S

Steve Pugh

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
 
S

SpaceGirl

brucie said:
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 #
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top