Solved

CSS links

Posted on 2010-11-29
8
327 Views
Last Modified: 2012-05-10
Hi,

I read as


When setting the style for several link states, there are some order rules:
a:hover MUST come after a:link and a:visited
a:active MUST come after a:hover


I have not understood
>>>>a:hover MUST come after a:link and a:visited
why a:hover has to come after a:visited esp when user first time visits link he need not have visited link earlier right. Please advise. Any links resources, sample code, ideas highly appreciuated thanks in advance
0
Comment
Question by:gudii9
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 10

Accepted Solution

by:
hosneylk earned 167 total points
ID: 34236533
0
 
LVL 52

Assisted Solution

by:Carl Tawn
Carl Tawn earned 167 total points
ID: 34237790
It means they must be declared after each other in the stylesheet. It is not related to how/when a user actually uses the link.
0
 
LVL 7

Author Comment

by:gudii9
ID: 34240452
hi,

>>>>It is not related to how/when a user actually uses the link.
it is not related with usage but still the order of declaration is important? why is it so. please advise

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 52

Expert Comment

by:Carl Tawn
ID: 34240597
The order is important because of the "cascading" thing. The last declared rule overrides the ones declared before it. So they need to be in Link, Visited, Hover, Active sequence for them to be applied correctly by the browser.
0
 
LVL 8

Assisted Solution

by:Zado
Zado earned 166 total points
ID: 34249825
0
 
LVL 8

Expert Comment

by:Zado
ID: 34317455
Please grant the points and close the question, thanks :-)
0
 
LVL 8

Expert Comment

by:Zado
ID: 34384858
To be clear here: I'm not asking for grant the points to me, but generally.
If you have a problem with any suggestion from experts or nothing works with your expectation, please let us know, so we will continue work on solution for you, thanks.
0
 
LVL 7

Author Comment

by:gudii9
ID: 34461931
>>>> The last declared rule overrides the ones declared before it.
Last declared means the recently declared one. How we know which one has to be declared last. So the link miust be last one declared (after Visited, Hover, Active sequence). please advise
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question