In this step we will transform the list from vertical to horizontal.

By default, list items are block-level elements and flow vertically down the page. We will re-define the display of the list items to display:inline. This will make them flow in a horizontal fashion, one after another on the same line.

In future steps we will put space between the list items so they are more attractive.

div#topnav li { display: inline; }

Your list should now look similar to this:

example at this point

At this point you may be asking yourself why we are bothering with all this styling of a list when we could simply type a horizontal line of text inside a DIV and style the links into buttons. Certainly you could take this approach and that method does work for very simple menus. But when you use a list to create a horizontal menu there are some distinct advantages:

Returning now to our quest for an attractive horizontal list-based menu, we will proceed with styling the navigation links.