• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Lesson 10. Styling Links > Setting Pseudo-Class Order

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  {...}


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint