...

View Full Version : Gap betwen nested list items breaks css rollover menu



shaman420
11-10-2010, 02:09 PM
Hello there, I am having a bit of trouble with a CSS rollover menu.
What I have is is a CSS nav built with nested <ul> tags. The rollovers work fine and the submenu shows up, but the problem is that there is a small gap between the <li> tags that messes up the functionality.

When you roll through and come across the gap, the submenu disappears.

Here is an example. (http://www.equinoxdesigns.net/thermacraft)

Ive played with the margins and padding on the <ul>, the <li> and the <a> tags on both levels of the nesting but the gap remains.

Excavator
11-10-2010, 05:29 PM
Hello shaman420,
Seems to work fine for me with FF3.6 and IE8.

teedoff
11-10-2010, 05:33 PM
I see the gap on his second level menu..when your mouse rolls over the gap, they disappear. I tried looking at your code earlier to see where the gap is coming from. I couldnt find any margins on your <li> tags in your stylesheet, but I might have overlooked something.

Excavator
11-10-2010, 05:35 PM
Nope, works fine here. The only thing I see is Company History is misspelled.

DrDOS
11-10-2010, 05:43 PM
The basic problem is that the hover is only applied to the a, which really means the text in the a tags. So I increased the font-size to 18px and now it does well. But it was flakey, sometimes work, sometimes not, before.

PS: works OK in Opera and Firefox now.

shaman420
11-10-2010, 06:15 PM
Since posting this, I found that changed the display:

.nav ul li

to

display:table-cell

That removes the gap and the menu works fine, just not in IE6-7..

DrDOS
11-10-2010, 06:57 PM
Since posting this, I found that changed the display:

.nav ul li

to

display:table-cell

That removes the gap and the menu works fine, just not in IE6-7..If you've made that change on your web page it's still flakey on FF now, and IE 6 & 7 depends on the a text for hover. If I were you I would still make the font-size 18px, that should get it working on all browsers. I'll keep checking your site to see any improvement.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum