Styling the List


To style this list, you will need to use selectors that target the <ul>, <li>, and <a> elements. You will also need to include the unique identifier, navigation, within each selector. The four selectors that you will use are shown in Listing 16.1. The HTML code is shown in Listing 16.2.

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

Listing 16.2. HTML Code Containing the Markup for a List
<ul >     <li><a href="#">Home</a></li>     <li><a href="#">About</a></li>     <li><a href="#">Services</a></li>     <li><a href="#">Staff</a></li>     <li><a href="#">Portfolio</a></li>     <li><a href="#">Contact</a></li> </ul> 




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