CSS/JS: Evenly spreading elements across multiple lines

Posted by David Lawson on Stack Overflow See other posts from Stack Overflow or by David Lawson
Published on 2010-05-07T10:09:28Z Indexed on 2010/05/07 10:18 UTC
Read the original article Hit count: 264

Filed under:
|
|

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

© Stack Overflow or respective owner

Related posts about css-layout

Related posts about css