I’ve never really understood the magic of links and css, sometimes it just works using a:link instead of just a. How does it actually work?
Does the a element target both a:link, a:visited, a:active and a:hover? No..
When having to style nested menus it can get a bit messy with all the css selectors you need on a three-level-menu :)
I think its just being specific. They both do the same.
When you use a: hover – you’re being specific to the anchor hover state
like wise a:visited and a:active
I would guess the actual proper way to write it (if you try to think like the W3C) would be:
I have to start declaring link for the anchor styles. It is indeed the correct way to do it.
Alright, thank you for clearing it up for me, Jonz.
I *think* the a:link will only affect anchor links that actually have an href attribute, which isn’t required. so
I could be wrong though? Someone should do a quick test =)
I don’t think that’s correct Chris.
The outcome was:
I must have not saved on the refresh or something :?
Sorry about that.
Thanks all. I just discovered these posts by Eric Meyer. It’s definitely worth a read.
Link Specificity, Ordering the Link States and Who Ordered the Link States?
You must be logged in to reply to this topic.