By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,632 Members | 1,425 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,632 IT Pros & Developers. It's quick & easy.

change secekted color in drop-down list

P: n/a
Hi!

is it possible to change "selector" color in drop-down list?

<select name="select" style="background-color: #ff0000">
<option style="background-color: #ff0000" value="1">Cony</option>
<option style="background-color: #ffffff" value="2">Alex</option>
<option style="background-color: #0000ff" value="3">Peter</option>
</select>

backgroung is no problem, but I want to change that gray defoult color
that apears when you "mark" f ex Alex. hoppe you understand what I
mean...
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
carramba wrote:
Hi!

is it possible to change "selector" color in drop-down list?

<select name="select" style="background-color: #ff0000">
<option style="background-color: #ff0000" value="1">Cony</option>
<option style="background-color: #ffffff" value="2">Alex</option>
<option style="background-color: #0000ff" value="3">Peter</option>
</select>

backgroung is no problem, but I want to change that gray defoult color
that apears when you "mark" f ex Alex. hoppe you understand what I
mean...

carramba,

Apparently there is no way, at least not on Netscape 7.1 or IE 5.5.
What I tried was:

<style>
option:focus {background-color: green !important}
option:active {background-color: green !important}
option:hover {background-color: green !important}
</style>

none of which had any effect. (By the way, on my system, the selection
hovered over became white text on a dark blue background, in both
browsers. Once selected, it took on the attributes on the select tag.
At no time did I see anything gray.)

That's not a bug, however, as the CSS2 spec provides a loophole:

"CSS doesn't define which elements may be in the above states, or how
the states are entered and left."
(http://www.w3.org/TR/REC-CSS2/select...pseudo-classes)

Chris Beall

Jul 20 '05 #2

P: n/a
Chris Beall <Ch*********@prodigy.net> wrote in message news:<Cu******************@newssvr15.news.prodigy. com>...
carramba wrote:
Hi!

is it possible to change "selector" color in drop-down list?

<select name="select" style="background-color: #ff0000">
<option style="background-color: #ff0000" value="1">Cony</option>
<option style="background-color: #ffffff" value="2">Alex</option>
<option style="background-color: #0000ff" value="3">Peter</option>
</select>

backgroung is no problem, but I want to change that gray defoult color
that apears when you "mark" f ex Alex. hoppe you understand what I
mean...

carramba,

Apparently there is no way, at least not on Netscape 7.1 or IE 5.5.
What I tried was:

<style>
option:focus {background-color: green !important}
option:active {background-color: green !important}
option:hover {background-color: green !important}
</style>

none of which had any effect. (By the way, on my system, the selection
hovered over became white text on a dark blue background, in both
browsers. Once selected, it took on the attributes on the select tag.
At no time did I see anything gray.)

That's not a bug, however, as the CSS2 spec provides a loophole:

"CSS doesn't define which elements may be in the above states, or how
the states are entered and left."
(http://www.w3.org/TR/REC-CSS2/select...pseudo-classes)

Chris Beall


thanx , it didn't have eny effect on my system too.. but thanx any way!
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.