Hi, i have a page on my site that lists businesses in an A-Z directory list.
My page is split into 3 columns and i was wondering IF it is possible to code the 3 columns so that they spread out the content between then so that they stay the same height… let me try and draw this.
A I P
B J Q
C K R
D L S
E M U
F N V
G O Y
H X
Y
Z
The 3 columns above are uneven… is there a way of coding the 3 columns so that they are fluid (not sure if that is the right word) so that it balanced out and shares the content evenly between the 3 columns, thanks in advance for your help…
If you are coding this by hand, there are various ways to do this. One way would be to have an unordered list (<ul>) with each list item (<li>) floated left (or set to display: inline-block or inline) and set to width: 33%. But you’d have to type the content in manually in the order you want it. Another option would be to use a table … though that’s not so good, since this isn’t tabular data. Or you could also set the <ul> to display: table and the <li>s to display: table-cell, width: 33%.
It’s not possible in css2+ to do this automatically but css3 has the multi column layout which will distribute equally between columns but is only supported in a few browsers at present.