0

Styling Links

What does this statement mean ? 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 Thank you for the answer !!

14th Feb 2017, 11:37 AM
Samuele Sacchetti
Samuele Sacchetti - avatar
3 Answers
+ 3
As @Roman Santa suggested: The order of these declaration are much more important than most of others ( but order is primordial too, just after priority rules of selectors ^^ ), as each can override others... so you need to always respect the right order to avoid unexpected result ( or get an expected one :P )
14th Feb 2017, 1:27 PM
visph
visph - avatar
0
CSS is not my cup of tea but i think this rules are there to avoid "overriding" styles before. So, if you use hover and then link.. link could not appear correctly as expected. #imo
14th Feb 2017, 11:41 AM
Roman Santa
Roman Santa - avatar
0
so if I will write both a:link and a:hover I have to write before a:link and then a:hover, right ?
14th Feb 2017, 11:57 AM
Samuele Sacchetti
Samuele Sacchetti - avatar