How do you display a list horizontally in CSS?

If you want to make this navigational unordered list horizontal, you have basically two options:

  1. Make the list items inline instead of the default block. .li { display: inline; } This will not force breaks after the list items and they will line up horizontally as far as they are able.
  2. Float the list items.

What is a horizontal list?

Horizontal lists, lists that appear within written text, present a series of items without promoting the items as priority on the page (as a vertical list does). There are three punctuation marks that are particularly useful when presenting lists: the colon, the semicolon and the comma.

How do you write a horizontal list?

Horizontal lists Use a colon to introduce the list items only if a complete sentence precedes the list. Omit the colon if the lead-in is not a complete sentence.

Is a list vertical or horizontal?

A list is a record that consists of an introductory statement and a series of items written one after another. The list can be presented vertically or horizontally. In a vertical list, the items are on separate lines.

Does ie preserve ordered list numbers when displaying a list horizontally?

I’ve tried every display property on this page and none of them preserve the ordered list numbers when displaying the list horizontally in IE (nor are they preserved in Firefox, Opera or Safari for Windows – and by extension probably Google Chrome, although I admit I didn’t test every display property there).

How to create a horizontal navigation bar with floating list items?

Using inline or floating list items. One way to build a horizontal navigation bar is to specify the elements as inline, in addition to the “standard” code from the previous page: display: inline; – By default, elements are block elements. Here, we remove the line breaks before and after each list item, to display them on one line

Is there a way to make a horizontal numbered list?

The only solution that (partially – in Firefox only) works is Al W’s answer. I think if you want a horizontal numbered list, you are going to have to generate it on the server or manipulate the list on the client using JavaScript to re-insert the numbers.