How do I set vertical space between list items?

Brice Coustillas picture Brice Coustillas · Oct 8, 2013 · Viewed 331.7k times · Source

Within a <ul> element, clearly the vertical spacing between lines can be formatted with the line-height attribute.

My question is, within a <ul> element, how do I set the vertical spacing between the list items?

Answer

user1633525 picture user1633525 · Oct 8, 2013

You can use margin. See the example:

http://jsfiddle.net/LthgY/

li{
  margin: 10px 0;
}