I am Peter Breuls. I write web applications in PHP, movie reviews and irregularly something on this weblog. Welcome!
Through my company Devize, I'm available as a developer or a consultant for websites or web applications.
I work as an Administrator at online community FOK! and as a Lead Developer at frontoffice supplier SIMgroep.

CSS3 Multi-Column Module

Tech / Web developmentcomment

I'm a web developer, and every now and then I have to create the HTML for a site that, in its design, uses multiple columns. It's at those moments when I think: "I know tables are bad, I know I shouldn't be using them for this, but please, may I?" It's a real drag to get a columns-based layout using just divs and CSS.

The W3C understands this, apparently, according to this A List Apart article. With the multi-column mode in CSS3, you can divide the text within a div into multiple columns. That's nice. A real good beginning in solving the "I cannot use tables, so what should I do"-problem.

But, we're not there yet. A columns-based layout isn't about text in multiple columns, it's about the entire site in multiple columns, just like this blog currently has two: one with the text in it, and one with the navigation. It's no problem if those columns can both do their own thing. One column has text, the other has links, and every column has its own length. Fine. But: if both columns are supposed to have the same length, it gets more difficult. What if one column becomes longer? How will the other one know it's supposed to scale accordingly?

It won't. There's no way for a div to make it size itself based on another div's size. That is, if you don't use hacks. Will there be a solution to that some day?

Comment