开发者

Make container DIV cover 100% of containing DIV's height

I'm working on a new website and on one my pages I just cant get my #main div which is my page content's containing DIV to stretch long enough to cover the inner DIV's.

Please check it out and point out the parts of my CSS开发者_如何学编程 that need fixing. Many thanks to all.


@bikey; just right

#main {
    background: none repeat scroll 0 0 #101010;
    border-color: #333333;
    border-style: solid;
    border-width: 1px 1px 0;
    margin: 15px auto 0;
    overflow: hidden;
    padding: 20px;
    width: 920px;
}

The problem is in your #main div there are floated element's so you have to clear it first. in the example above i write overflow:hidden & remove height:100%


Just remove height: 100% from layout.css at #main{...} (line 31 or so) and add <br style="clear:both;" /> after <div id="content">...</div>

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜