本文介绍了如何设置高度自动CSS属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
这是asp.net中的CSS问题.
我有一个被容器div包围的页面.其中包含contenthome div,其中包含flashhome div.
Container和contenthome height属性设置为auto.但是当我增加flashhome高度时,容器和contenthome的高度不会相应地更改.如何实现自动增加和减少容器和contenthome的高度,具体取决于flashhome的高度.
Hi All,
This is a CSS question in asp.net.
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.
#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;
}
谢谢.
推荐答案
这篇关于如何设置高度自动CSS属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!