The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › Why is this UL navigation menu is taller than containing li elements?
Hi, My main nav menu is taller than its containing li elements and I have no idea why.
I want to avoid floating the li, as the menu needs to be center aligned on the page.
Site link
Thanks
I’m not sure precisely what’s going on but you are floating the anchor tags in the menu.
Removing that seems to get you most of the way.
#block_top_menu and ul.sf-menu both have line-heights, I bet if you removed all line-heights in that whole section it would fix itself…
#block_top_menu
ul.sf-menu
Try this set line-height:1em; for #block_top_menu > ul
line-height:1em;
#block_top_menu > ul