Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Newspaper-column in CSS

Tags:

css

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?

like image 882
user366312 Avatar asked Nov 06 '09 08:11

user366312


People also ask

What is column in CSS?

The columns CSS shorthand property sets the number of columns to use when drawing an element's contents, as well as those columns' widths.

How do you display items in a column in CSS?

Create a list with as many list elements as you want. Then enclose the list in a div, setting style=column-width and style=column-gap, to match the information in your list elements. Do not set style=columns.

What is CSS multi-column?

The basic idea of multicol, is that you can take a chunk of content and flow it into multiple columns, as in a newspaper. You do this by using one of two properties. The column-count property specifies the number of columns that you would like the content to break into.


1 Answers

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.

like image 140
bguiz Avatar answered Sep 29 '22 01:09

bguiz