Greetings!
I like doing this:
.nav-item {
color:#000;
text-decoration: none;
}
.nav-item.selected {
color:#f00;
text-decoration: underline;
}
Which lets me do things like this:
<a href="" class="nav-item selected">Home</a>
<a href="" class="nav-item">About</a>
<a href="" class="nav-item">Contact</a>
<a href="" class="nav-item">Log Out</a>
So that any .nav-item that also has class .selected gets a special selected style.
I really like the power of class selectors. It allows you to designate concepts for various purposes. just add ‘selected’ as a class of anything that needs a selected state and then style selected in context. It’s great.
But ie6 doesn’t support it!
I know only ~3% of users use IE6, and I would love to drop it, but within certain market segments, such as financial, it can be as high as 30%. So there are times when you need to support it.
IE6 cascades all .selected definitions within child scope together. I know I could just create original names for each selected state .nav-item-selected .subnav-item-selected.