开发者

Why CSS layouts full size and height doesn't use absolute positioning?

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!


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜