Setting Pseudo-Class Order


The five pseudo-classes have the same weight, so the order in which they are placed within a CSS file is important. Pseudo-class declarations that appear later in a CSS file will override those that appear earlier. The correct order is shown in Listing 10.2.

Listing 10.2. CSS Code Containing Correct Order of <a> Pseudo-Classes
a {...} a:link  {...} a:visited  {...} a:focus  {...} a:hover  {...} a:active  {...} 




Sams Teach Yourself CSS in 10 Minutes
Sams Teach Yourself CSS in 10 Minutes
ISBN: 0672327457
EAN: 2147483647
Year: 2005
Pages: 234
Authors: Russ Weakley

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net