All the previous answers only provide a hard-coded location of where the first column ends and the second column starts. I would have expected that this is not required or even not wanted.
Recent CSS versions know about an attribute called columns
which makes column based layouts super easy. For older browsers you need to include -moz-columns
and -webkit-columns
, too.
Here's a very simple example which creates up to three columns if each of them has at least 200 pixes width, otherwise less columns are used:
CSS based columns
CSS based columns
- Item one
- Item two
- Item three
- Item four
- Item five
- Item six
- Item eight
- Item nine
- Item ten
- Item eleven
- Item twelve
- Item thirteen