Forum Moderators: not2easy

Message Too Old, No Replies

multicolumn layout

3, 4, 5, 6... without container divs

         

Banaticus

3:10 am on Jun 2, 2010 (gmt 0)

10+ Year Member



So, I was thinking about multicolumn CSS layouts. 3, 4, 5, 6 columns... My thought was, instead of embedding divs within divs (because we only have float:left, float:right and the default center elements to work with), I would take advantage of other CSS elements. But it hasn't worked so far.

My thought was, an inline list, with each inline li element containing a content div (or a regular div). The only problem is that I can't seem to get this to work. I'm going to have to redo the number of columns on different pages, I'd really love to not have to redo the CSS and number of container divs for each individual page.

alt131

3:47 am on Jun 2, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Banaticus,

A search will produce a web-site dedicated to producing layouts using lists in the way you describe. The idea has not been widely adopted because many coders want code that is semantically valid. That means using lists for lists - not page <div>isions or <p>aragraphs of text in the way you are describing.

because we only have float:left, float:right and the default center elements to work with)
That depends on what browsers you are supporting, and what you are trying to achieve. More than 3 columns does sounds like a lot for a general web-page intended for general use. However, positioning and display can be used to achieve desired layouts, and the css multi-column layout has reached candidate recommendation status.

I'd really love to not have to redo the CSS and number of container divs for each individual page
Then I'd suggest a good place to start would be to evaluate the content before considering structural elements (lke container divs), and style (the css). Semantic mark-up frequently provides opportunities that will make the css easier, and avoid having to use purely presentational mark-up (like container divs). Also making css external will avoid having to re-do it for each page.