2-col CSS布局与填充全高的背景颜色? [英] 2-col CSS layout with background colors that fill full height?
问题描述
我有一个合理的曝光CSS布局。
I've had a reasonable amount of exposure to CSS layout.
我看了很多CSS布局的2或3列布局,很难找到即使只是一个可靠的2列,允许我做以下:
I've looked at quite a few CSS layouts for 2 or 3 column layouts, and having a hard time to just find even just a reliable 2 column that allows me to do the following:
我想要的:
- 每一列都有自己的背景颜色
- 我想让背景栏填满页面的完整高度
- 我不知道哪一列将包含大多数文本,所以每个列必须单独调整大小
- 背景需要一张图片(有些聪明,但哟!)
- 如果该列最长,则背景颜色只填满整个高度
只需恢复到< TABLE>
,我可以在约3行代码中可靠地实现。
I'm very tempted to just revert back to <TABLE>
which I can reliably implement in about 3 lines of code.
推荐答案
If faux columns isn't your thing try multi-column layouts.
从每个块中删除内容(有很多内容)来尝试。
Remove content from either block (there's plenty of it) to try it out.
这是我遇到的麻烦 - 我建议您将 A List Apart 书签加入书签,并查看一些文章在CSS类别。他们有一些很好的教程和写的前端编码器(像CSS sprites,液体布局,字体等)。
This was always a thing I had trouble with - I'd advise you to bookmark A List Apart and have a look through some of the articles in the CSS category. They have some excellent tutorials and writeups there for frontend coders (things like CSS sprites, liquid layouts, fonts etc.).
这篇关于2-col CSS布局与填充全高的背景颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!