我試圖在我的網站中心放置兩列,但也有一些問題。每一個變化的結果都是左邊的位置。我究竟做錯了什麼?更多關於圖片。如何使用CSS居中兩列?
body {
background - image: url("../img/gray.png");
}
#header {
position: absolute;
top: 0;
left: 0;
right: 0;
height: 100px;
background: #cc0000;
text - align: center;
}
#wrapper {
margin: 100px;
width: 1280px;
}
#leftcolumn {
float: left;
background - image: url("../img/gray.png");
margin: 10px 0px 10px 0px;
padding: 10px;
height: 682px;
width: 460px;
}
#rightcolumn {
float: left;
color: #333;
border: 1px solid # ccc;
background: #F2F2E6;
margin: 10px 0px 10px 0px;
padding: 10px;
height: 500px;
width: 439px;
display: inline;
position: relative;
}
website http://i46.tinypic.com/5tov7.jpg 感謝
請提供一個jsfiddle或類似的東西。可能需要使用「自動」水平頁邊距。 – 2013-02-11 15:04:18