469,294 Members | 1,576 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,294 developers. It's quick & easy.

How to change the mouse over color for select tag?

irfanmodan
Hi Everybody,

i have one critical problem in HTML,

when i using select tag,

for eg:

<select>
<option>Test 1</option>
<option>Test 2</option>
</select>

i need mouse over color to change when mouse moves to options

default background color is blue,

Let me know it is possible.

please help me

Thanks In Advance
Irfan
Feb 26 '11 #1
1 2316
acoder
16,027 Expert Mod 8TB
First things first, ask yourself if you really need this.

If you do, you can look at using:
Expand|Select|Wrap|Line Numbers
  1. elem.style.backgroundColor = ...
where elem is the option. I think that you may not be able to override the default colour (there may be a way, but it's not really something I'd be too concerned with), but it should change colour after moving the mouse.

This may also not work in IE.

If you want to guarantee that it works, you can create your own pseudo-element using a combination of HTML/CSS and JavaScript (i.e. DHTML).
Feb 28 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by carramba | last post: by
11 posts views Thread by Yeah | last post: by
1 post views Thread by Angel | last post: by
3 posts views Thread by Ryan Liu | last post: by
2 posts views Thread by fritz21 | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.