tags:

views:

237

answers:

3

Is it possible to have a css newspaper-column layout arranged such a way that, any number of columns can be added and they will be continuously added to the right of the existing columns.

My thought is like this: I would just add a new div and a new column will be added to the right and so on.

If yes, how?

Here I found a 4-column newspaper layout. But column-heights are not same. I need a way so that, no matter how long the text is, they would be stipulated to a certain height.

Is it possible in CSS?

A: 

you can set the height of the column using CSS, but adding a column automatically its a programming stuff using other web programming languages.

Treby
My thought is like this: I would just add a new div and a new column will be added to the right and so on.
JMSA
And height is not working. Coz, when the text is longer it is taking more room.
JMSA
+1  A: 

With pure CSS, it's very hard to assign several divs the same height unless that height is static. You can use ugly hacks but that will only get you so far.

For real columns, use tables, that's what they are for. Tables are valid HTML constructs, it's just that you shouldn't use them as your only layout tool. But when tables work, use tables.

Aaron Digulla
+2  A: 

I think your needs are best served using an existing CSS framework, rather than coding it yourself from scratch, since it is really tricky business plus apallingly hard to get to work across all browsers (since some of them are not standards compliant)

Anyhow, for newspaper columns, I think there's one out there that fits the bill, 960 Grid System. It comes with 12 & 16 column "grids", with the gutters and paddings all worked out, and so long as the number of columns you intend to use is a factor of 12 or 16, it can handle it.

bguiz