Styling the List


To style this list, you will need to use selectors that target the <ul>, <li>, and <a> elements. To make sure you do not target every instance of these elements on the page, you will need to include the unique identifier, navigation, within each selector. The four selectors that you will use are shown in Listing 15.2.

Listing 15.2. CSS Code Showing the Selectors for Styling the List
ul#navigation {...} ul#navigation a {...} ul#navigation a:hover {...} ul#navigation li {...} 

What Are Selectors?

Selectors are used to "select" elements on an HTML page so that they can be styled.


For more information, see Lesson 3, "Selectors in Action."





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