Horizontal list using display inline

Description

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

Snippet

li{
display: inline;
margin-right: 20px;
list-style: none;
}

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options