Forums

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

Home Forums CSS Navigation Bar Re: Navigation Bar

#143415
jurotek
Participant

> I’d look for one that was built much better than the one in the link you provided

Agree. Browsers are smarter then we think. It knows that a is inside li and li inside ul so the mark up is not efficient and redundant. Something like this will work better. Here’s CSS

.navigation {your styles}
.navigation li {your styles}
.navigation a {your styles}
.navigation a:hover {your styles}
.navigation a.active, .navigation a.active:hover {your styles}

and HTML

If I don’t use dropdowns I don’t use unordered list for nav at all

.navigation {your styles}
.navigation a {your styles}
.navigation a:hover {your styles}
.navigation a.active, .navigation a.active:hover {your styles}

and HTML