Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

hover problem with non link elements in IE

is there any way to use "hover" attribute for all html elements instead of just '' in IE?

for example 'li:hover' . it doesn't work in IE6 . (i don't know about other versions of IE).

Edited: i just want to do it with CSS no javascript. it is a simple menu.

like image 208
hd. Avatar asked Apr 14 '26 01:04

hd.


2 Answers

No, IE6 didn't properly implement the :hover pseudo-class for all elements. It only supports it for anchors.

like image 114
i_am_jorf Avatar answered Apr 16 '26 22:04

i_am_jorf


I don't think there is anyway that you can do it without javascript in IE 6.

If it is a one level menu, you might be able to tweak the styling to make the links render as display:block inside of the li so you can perform hovers on them, and if needed put spans inside the links for extra styling flexibility, but personally never had much luck trying to extend that to multi level menus.

A strategy of graceful degradation may be your best bet there.

like image 32
seanb Avatar answered Apr 16 '26 21:04

seanb