我遇到了一個問題,我只是無法擺脫困境。 我想要三個不同的div,填充整個頁面(沒有滾動條)和中間的div與另一個div水平和垂直居中。 我嘗試了這麼多,但總是破壞佈局。CSS基本佈局 - 3 divs + 1 div在另一箇中心,
到目前爲止,這是我的代碼:
html, body {
background-image: url(images/bg_tile.gif);
background-repeat: repeat;
margin: 0;
padding: 0;
resize:none;
width: 100%;
height: 100%;
}
#header {
width: 100%;
height: 14%;
background-color: #09F;
top: 0px;
}
#body_con {
width: 100%;
height: 80%;
background-color: #0CF;
}
#footer {
width: 100%;
height: 6%;
background-color: #09F;
bottom: 0px;
}
#body_image {
width: 90%;
height: 90%;
margin:0px auto;
background-color: white;
}
我知道,在某種程度上這是可能的,但我只是無法得到它的工作。 任何想法?
謝謝 利奧
請向我們展示HTML。 – matewka
使用http://jsfiddle.net/ –
當然! '