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

Lesson 16. Creating Horizontal Navigation > 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;
}


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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