Question

I'm looking to implement a two column layout in CSS (only) that use all the height and with the first column fixed. I googled a lot and find many CSS layouts that could fit, but any of them use absolute position.

I can't understand why, since it's more easy to define what goes where, and just keep the flexible part with margins in order to avoid it to goes into others elements.

Is there a concrete reason? Something that is definitely not compliant or something I'm missing?

Thanks for your help!

Was it helpful?

Solution

First, I'm sure that you can find CSS layouts that use absolute positioning. Historical concerns about browser support are mostly that — historical. **

But, since static positioning is the default, it is possible (and no doubt common) to use CSS without even being aware of alternatives. And I agree with @JMC that other layouts should be used only when "absolutely" necessary. For one thing, they are harder to maintain, since many more properties must be specified.

** I said mostly.

OTHER TIPS

Because many people do not know what they are doing.

You most certainly do not need to use absolute positioning to achieve a well coded two column layout.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top