How can I make <li> elements flow left-to-right instead of top-to-bottom?

css, html

Solution

i think you are looking for

li {
  display:inline;
}

Problem

Here are my `<li>` elements. I want them to appear left-to-right instead of top-to-bottom. ``` <div class="nav"> <ul> <li><a href="test">test</a></li> <li><a href="test">test</a></li> <li><a href="test">test</a></li> <li><a href="test">test</a></li> <li><a href="test">test</a></li> </ul> </div> ``` How can I do this? EDIT:how to control spacing between each li element and its bachground color and spacing between a element and border of li element?

Original source