需要CSS边栏高度以展开内容 [英] Need CSS sidebar height to expand with content
问题描述
我有一个两列布局,在右边有一个灰色边栏。当左列的高度增加时(由于内容被动态扩展),我需要侧边栏的高度来展开。我可以使侧边栏适合一个静态页面,但我不能让它增加与页面的其余部分的大小。
有没有人知道如何做到这一点?
如果你使用DIVS这个类型的布局,这是一个常见的问题。栏,你应该得到一些答案。
例如。 http://www.alistapart.com/articles/fauxcolumns/
I have a two column layout, with a gray sidebar on the right. I need the sidebar's height to expand when the height of the left column is increased (due to content being dynamically expanded). I can make the sidebar fit a static page, but I cannot get it to increase in size with the rest of the page. Did some Googling, but couldn't find a work-around that worked for me.
Does anyone know how to do this?
This is a common problem when using DIVS for this type of layout.
If you google 'Faux column' you should get some answers.
eg. http://www.alistapart.com/articles/fauxcolumns/
这篇关于需要CSS边栏高度以展开内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!