Styling the <li> ElementTo 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.
|