外部div不为asp.net中的内部div提供自动高度 [英] outer div does not provide its automatic height for inner divs in asp.net
本文介绍了外部div不为asp.net中的内部div提供自动高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我维护了以下属性的div
I have maintained div with below attributes
.mainDivCenter
{
width:1250px;
margin:0 auto;
padding-top:5px;
padding-bottom:5px;
background-color:#FFD47B;
/*background-color:blue;*/
border:1px dotted gray;
border-radius:20px 20px;
padding-left:30px;
padding-right:30px;
min-height:680px;
height:100%;
}
我的查询是当我把更多 divs
,其中 div
不会增加高度
控件被移出 div
请帮我解决这个问题。
我的项目完全依赖o n div
导向设计
我的要求是在 maindiv中添加控件时
应为儿童提供背景颜色 divs
。
My query is when i put the more divs
with in that div
that does not increase the height
controls are moved out of that div
please help me how to fix this.
My project is fully depend on div
oriented design
my requirement is when ever added controls in maindiv
that should be provide background color for child divs
.
推荐答案
添加overflow:auto;
到CSS。
所以,CSS Class看起来像......
Addoverflow: auto;
to the CSS.
So, CSS Class would look like...
.mainDivCenter {
overflow: auto;
width:1250px;
margin:0 auto;
padding-top:5px;
padding-bottom:5px;
background-color:#FFD47B;
/*background-color:blue;*/
border:1px dotted gray;
border-radius:20px 20px;
padding-left:30px;
padding-right:30px;
min-height:680px;
height:100%;
}
这篇关于外部div不为asp.net中的内部div提供自动高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文