I’d use margin-top in that case… or perhaps vertical-align:bottom on all of them. I’d have to play with it.
Don’t take that one TOO hard – I’m a stickler for meaningful names and semantic markup; it’s why I piss on HTML 5 from so on high you’d think the almighty itself was taking a tinkle.
“active”.
There are five link pseudo-states – :active, :focus, :hover, :link, and :visited. “active” is the one used IN THEORY when keyboard/non-mouse navigation has moved it’s cursor to the element – though some legacy browsers use “focus” instead – though focus is supposed to be for when you click on or activate the element; when you click on it, it receives “focus”.
This is why when I have an anchor I’m setting up hover states on, I do all three:
a:active,
a:focus,
a:hover {
As it nabs all possibilities by which someone might select the element.
I never set :link directly, but that’s because ALL of them inherit from the parent anchor. Common mistake people make is re-declaring the same values over and over again on all the states, when if you just say…
a {
/* bunch of stuff here */
}
all the psuedo-states pick up what you set there – then all you have to do with the active, hover, focus and visited is set what you want DIFFERENT.
Classes should be used in much the same manner. You’ll see people doing this idiocy all the blasted time:
<div id="nav">
<ul id="navUl">
<li class="navLI">
<a class="navA" href="#">Home</a>
</li>
<li class="navLI">
<a class="navA" href="#">Links</a>
</li>
<li class="navLI">
<a class="navA" href="#">Forums</a>
</li>
</ul>
</div>
When the div probably isn’t needed, the id on the UL is redundant, and NONE of those elements need classes… so basically that mess of markup is doing the job of this:
<ul id="mainMenu">
<li><a href="#">Home</a></li>
<li><a href="#">Links</a></li>
<li><a href="#">Forums</a></li>
</ul>
In that way, your applying just “active” was a good thing, just poor choice of a name. Classes and ID’s should be used for what’s unique – never for what’s the same as it’s sibilings. You’re already writing better code than the {nastiest expletive possible about one’s competence omitted} doing things like say… writing skins for turdpress; or even writing major CMS like turdpress, boomla, poopal, or any of the other “off the shelf” trash that’s currently in vogue.