CSS/JS: Evenly spreading elements across multiple lines
- by David Lawson
How would you go about evenly spreading elements across multiple lines, for example:
wrapper div: <div style="text-align: center">
elements inside: <div style="display: inline-block;
padding-left: 10px; padding-right: 10px;">Element</div>
Instead of only having one element on the next line (wrapped):
Element 1 Element 2 Element 3 Element 4 Element 5
Element 6
It does this, spreading out the elements:
Element 1 Element 2 Element 3
Element 4 Element 5 Element 6