Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

2-column auto-layout by CSS?

Tags:

html

css

Given a

<div>
Lorem ipsum dolor sit amet, consectetur adipiscing...
</div>

is it possible with CSS to generate a 2 or 3-column layout automatically, say by specifying the height of the container? If not, what are best practices in such a case?

Thanks for your help.

like image 616
Michael Avatar asked Aug 03 '10 10:08

Michael


1 Answers

Given comments on my previous answer, it seems that I may have misunderstood what you were looking for.

If you want text to automatically flow from one column to another then your options are:

  • CSS 3 Multi-columns (poorly supported)
  • JavaScript (interesting reflow issues)

Personally, I would avoid it. In general, content that flows from one column to the next is quite screen-media-unfriendly.

like image 73
Quentin Avatar answered Oct 12 '22 16:10

Quentin