需要CSS边栏高度以展开内容 [英] Need CSS sidebar height to expand with content

查看:149
本文介绍了需要CSS边栏高度以展开内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个两列布局,在右边有一个灰色边栏。当左列的高度增加时(由于内容被动态扩展),我需要侧边栏的高度来展开。我可以使侧边栏适合一个静态页面,但我不能让它增加与页面的其余部分的大小。



有没有人知道如何做到这一点?



如果你使用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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆