本文介绍了高度自动CSS属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是asp中的一个CSS问题。 我有一个被容器div包围的页面。这包含contenthome div,里面有flashhome div。 容器和contenthome height属性设置为auto。但是当我增加闪光灯高度时,容器和内容高度不会相应地改变。如何根据房屋高度实现自动增加和减少容器和内容高度。 我在下面插入了CSS代码。
This is a CSS question in asp. I have a page which is surrounded by container div. This contains contenthome div, with flashhome div inside it. Container and contenthome height property is set to auto. But when I increase flashhome height, container and contenthome height is not changed accordingly. How can I achieve autoincrease and decrease of container and contenthome heights depending on flashhome height. I have inserted CSS code below.
#container { width: 750px; height: auto; margin-left: auto; margin-right: auto; position: relative; border:1px; border-color: #b7b7b7; border-style: solid; } #contentHome { width: 750px; height: auto; position: relative; display: block; overflow: hidden; } #flashHome { float: left; display: block; width:485px; height: 255px; margin-left: 15px; margin-top: 5px; }推荐答案
您好b $ b 我只是为您的查询创建小提琴。 jsfiddle/L4GDt/ [ ^ ] Flash Home div中的更改。 Hi Just i create fiddle for your query. jsfiddle/L4GDt/[^] Changes in the Flash Home div. #flashHome { position: relative; display: block; width:485px; height: 255px; margin-left: 15px; margin-top: 5px; background:#f00; }
更多推荐
高度自动CSS属性
发布评论