Horizontal list using display inline

Setting the display property to inline is an alternative to setting the float property to left.

  1. li{
  2. display: inline;
  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

Conquer Drupal 8 Module Development

Don't struggle to conquer Drupal 8 module development. Action packed lessons where you will work along building your own real world modules.

20% launch discount available now!

Find out more

Add new comment