Horizontal list using float

Using float left is a popular way to make a list horizontal. It tends to have less problems then the alternative, which is using display: inline.

  1. li{
  2. float: left;
  3. margin-right: 20px;
  4. list-style: none;
  5. }

Enjoy this article?

Get my best content on Javascript, CSS, PHP & Git before anyone else and special bonuses.

Get started

Add new comment