This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > December 2003 > Dropdown list highlight colour





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Dropdown list highlight colour
Colin Steadman

2003-12-12, 1:37 pm

I have a dropdown list with a couple of dozen entries. I can change
the backgroup and text colour. But I cant find the CSS attribute
which changes the highlight colour which appears as the mouse moves up
or down the list. At the moment its the default deep purple colour
you get in any windows app, but I'd like change this to a more
suitable colour for my site.

This is what I have already -

<html>
<head>
<title>Dropdown Colour</title>
<style type="text/css">
option {
background: #E0E0E0;
color: #000000;
highlight: #C6C4BD;
}
</style>

</head>

<body>

<select>
<option>Shell</option>
<option>Cabbage</option>
<option>Beans</option>
<option>Cheese</option>
<option>Clock</option>
<option>Monkey</option>
</select>

</body>
</html>


TIA,

Colin
Anne van Kesteren

2003-12-12, 1:37 pm

Colin Steadman wrote:
quote:

> I have a dropdown list with a couple of dozen entries. I can change
> the backgroup and text colour. But I cant find the CSS attribute
> which changes the highlight colour which appears as the mouse moves up
> or down the list. At the moment its the default deep purple colour
> you get in any windows app, but I'd like change this to a more
> suitable colour for my site.
>
> This is what I have already -
>
> <html>
> <head>
> <title>Dropdown Colour</title>
> <style type="text/css">
> option {
> background: #E0E0E0;
> color: #000000;
> highlight: #C6C4BD;
> }
> </style>
>
> </head>
>
> <body>
>
> <select>
> <option>Shell</option>
> <option>Cabbage</option>
> <option>Beans</option>
> <option>Cheese</option>
> <option>Clock</option>
> <option>Monkey</option>
> </select>
>
> </body>
> </html>
>
>
> TIA,
>
> Colin



option:hover{
background:#C6C4BD;
}

Should do the job.

--
Anne van Kesteren
<http://www.annevankesteren.nl/>
Colin Steadman

2003-12-13, 5:11 pm

>
quote:

> option:hover{
> background:#C6C4BD;
> }
>
> Should do the job.




Excellent, thank you very much!

Colin
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews