i'm trying to change the hover color on a select box. by default, when you scroll through a menu/list, the background color of a selected option is blue (a system color). i'd like to change that, but so far no luck.
any help is great appriciated.
Thanks!Do a forum search, questions like this have been asked many times before.i think javascript is your only solution, as the :hover pseudo only applies to links...
i.e.:<select onmouseover="this.style.background = 'blue'">blah.</select>
the advantage to this way is if you put the intrinsic in the option tag then u could make it each a diff color onmouseover, just be sure to add in a onmouseout...Originally posted by omega
the :hover pseudo only applies to linksIncorrect. That's only true in a substandard HTML renderer like IE (it can't accurately or correctly be referred to as a browser). In modern browsers like Mozilla, :hover applies to all elements.are you kidding? thats awesome! i'm gonna have to add some effects where stuff lights up onmouseover... any way of targeting only a specific letter with CSS?You can also use IE behaviors to emulate :hover without polluting your code with onmouseovers:
<!-- m --><a class="postlink" href="http://www.vladdy.net/Demos/IEPseudoClassesFix.htmlintersting.">http://www.vladdy.net/Demos/IEPseudoCla ... ntersting.</a><!-- m -->. but whats an htc file?Originally posted by omega
intersting.. but whats an htc file? It's an HTML Component. In this case, it's basically some extra JavaScript to allow IE to perform things real browsers can.sounds useful....
any help is great appriciated.
Thanks!Do a forum search, questions like this have been asked many times before.i think javascript is your only solution, as the :hover pseudo only applies to links...
i.e.:<select onmouseover="this.style.background = 'blue'">blah.</select>
the advantage to this way is if you put the intrinsic in the option tag then u could make it each a diff color onmouseover, just be sure to add in a onmouseout...Originally posted by omega
the :hover pseudo only applies to linksIncorrect. That's only true in a substandard HTML renderer like IE (it can't accurately or correctly be referred to as a browser). In modern browsers like Mozilla, :hover applies to all elements.are you kidding? thats awesome! i'm gonna have to add some effects where stuff lights up onmouseover... any way of targeting only a specific letter with CSS?You can also use IE behaviors to emulate :hover without polluting your code with onmouseovers:
<!-- m --><a class="postlink" href="http://www.vladdy.net/Demos/IEPseudoClassesFix.htmlintersting.">http://www.vladdy.net/Demos/IEPseudoCla ... ntersting.</a><!-- m -->. but whats an htc file?Originally posted by omega
intersting.. but whats an htc file? It's an HTML Component. In this case, it's basically some extra JavaScript to allow IE to perform things real browsers can.sounds useful....