我有一個簡單的div與標題,內容和頁腳。現在我的問題是,我的div底部有一個空白。如果我調整瀏覽器窗口的大小額外white-space
正在我的div的bottom
加入。瀏覽器高度DIV在底部創建額外的空間
整個leftContainer應該是browser height
。
例如,我需要這樣的東西this(實際上這樣做是N快閃我希望它在HTML中進行)
這是現在的樣子:
這裏是我的CSS:
html, body
{
margin: 0;
border: 0 none;
padding: 0;
overflow: hidden;
}
html, body, #wrapper, #left, #right
{
height: 100%;
min-height: 400;
}
.leftContainer
{
width:308px;
max-height: 100%;
height:100%;
border-style: solid;
border-width: 2px 0px 0px 0px;
background-color: #ffffff;
box-shadow: 0px 0px 7px #292929;
-moz-box-shadow: 0px 0px 7px #292929;
-webkit-box-shadow: 0px 0px 7px #292929;
}
.mainbody
{
padding-left: 5px;
margin-top: 0;
min-height: 150px;
max-height:736px;
height: 100%;
background-color: #F9F9F9;
}
.header
{
height: 40px;
color: #000;
border-bottom: 1px solid #EEE;
}
.footer
{
padding-left:20px;
height: 40px;
background-color: whiteSmoke;
border-top: 1px solid #DDD;
-webkit-border-bottom-left-radius: 5px;
-webkit-border-bottom-right-radius: 5px;
-moz-border-radius-bottomleft: 5px;
-moz-border-radius-bottomright: 5px;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
}
HTML:
<div class="leftContainer ">
<div class="header">Header</div>
<div class="mainbody">
<p>Body</p>
</div>
<div class="footer">Footer</div>
</div>
我不想頁腳是獨立的應該是它的父專區內(leftContainer
)
你有沒有關閉其類的div = leftcontainer – 2012-05-11 07:06:22
@ ANKIT,它在這裏只是一個錯字但它在演示中。 – coder
只有,你想leftcontainer有高度等於身體 – 2012-05-11 07:08:03