Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] Horizontal Nav Bar – First Ul Li Reply To: [Solved] Horizontal Nav Bar – First Ul Li

#176403
Paulie_D
Member

This is your code for the linked a tags

#nav a:hover {
text-decoration: underline;
background: #f1f1f1;
}

For the unlinked li which really should contain a link then you wouldn’t have this problem…and it would make the submenu on that menu item line up as well (I think).

You would have to do

#nav li:hover {
    background: #f1f1f1;
}

Note that this will affect all the li but that shouldn’t matter as the a tags will cover it up.

For the first menu item at the very least the text should be in a proper text tag and not a text node although, as I said, there should be no reason not to have a link in there.