开发者

CSS Content Not increasing with Content

I have a CSS Question I want this div to automatically expand vertically as more and more content fills it. I thought that omitting it's height setting in the style would do so but it hasn't seemed to fix it. My CSS

.box{
-moz-border-radius: 15px 15px 15px 15px;
background-color:#433B39;
background-image:none;
color:white;
display:block;
margin-top:20px;
padding-left:16px;
padding-right:16px;
wid开发者_StackOverflow社区th:925px;
}


Are you floating the content inside of that div? If so, then it won't expand to fit them, you need to put a clearing div after the floating content for this.


use auto:height .You may also mention min-height to some value to maintain a minimum height

ex :

.box{
     width:925px;
     min-height:10px;
     height:auto;
    }

Did you try with setting float:left for the external container?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜