Styling the li Element


Styling the <li> Element

To make sure the list items are displayed in a single line, the <li> element must be set to display: inline as shown in Listing 16.7. The results can be seen in Figure 16.2.

Listing 16.7. CSS Code Setting display: inline;
ul#navigation {     margin-left: 0;     padding-left: 0;     list-style-type: none;     background: #036;     float: left;     width: 100%; } ul#navigation li {     display: inline; } 

Figure 16.2. Screenshot of list with the <li> element styled.





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