Hacker News new | ask | show | jobs
by jandrese 2577 days ago
Can you give us a link to your elegant table-less IE5 supporting website? I would like to see how you achieved it.

I lost a lot of hair trying to make a simple 3 column layout where the middle column would scale to the width of the window and could consist of multiple DIVs in a vertical row, all of the same width. AKA "baby's first blog" layout. Something that should have been one of the design cases for CSS.

1 comments

> Can you give us a link to your elegant table-less IE5 supporting website?

I cannot. They no longer exist. This was 14 years ago. I left web development shortly afterwards.

For your example, horizontal alignment was easy. One container div with a width of 99.9% and a left/right margin of auto. Inside you place three divs (columns) with a width of 33.3% and float left. Add another div at the end to clear the float.

Vertical alignment required a "hack."

http://www.greywyvern.com/code/min-height-hack

And to be clear, I never called it "elegant." I simply suggested it was possible.

Should CSS have been better? Sure. But, by that measure, it still sucks today.

You don't want the sidebars to scale with the screen though, just the middle. And as I recall the obvious solution of just setting a fixed width on the two outer divs and letting the middle one autoscale didn't work for some stupid reason. Maybe because they scaled to the content, not the width of the remaining space.