我試圖讓我的基本網頁佈局在一起,我遇到了一些問題。有人可以幫我解決它。我對CSS的理解並不高超。網頁佈局結構
粘性頁腳的工作,我想在頁面的左邊一列,就在頁眉和頁腳之間。我不確定我做的方式是否正確。
在左列和右列與頁眉和頁腳之間我想放內容。我如何居中。我無法找到合適的方法,因爲總會出現溢出現象,我只希望它在左列和右列之間移動,並且不需要切斷。
謝謝你的幫忙!
編輯: 我已經更新了我的佈局,並用了一點jquery來幫忙。我知道我應該儘量讓所有的東西在CSS中工作,但似乎不可能。
也許我應該補充說,我想要一個白板作爲主題。我想要一個木製框架,所以側邊欄總是必須連接到頁眉和頁腳,因爲頂部和底部框架都在那裏通過。
如果有人可以看看,並告訴我,如果這是好的或不。
* { margin:0; padding:0; }
html, body, #wrap { height: 100%; }
body > #wrap {height: auto; min-height: 100%;}
#main { padding-bottom: 150px; } /* must be same height as the footer */
#main header{
height: 100px;
width: 100%;
background-color: #5d3be6;
}
footer{
position: relative;
margin-top: -150px; /* negative value of footer height */
height: 150px;
clear:both;
background-color: #afeba4;
}
/* CLEAR FIX*/
.clearfix:after {content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;}
.clearfix {display: inline-block;}
/* Hides from IE-mac \*/
* html .clearfix { height: 1%;}
.clearfix {display: block;}
/* End hide from IE-mac */
#layout_left{
float: left;
width: 100px;
min-height: 100%;
height: 100%;
background-color: #f21ce7;
}
#layout_right{
float: right;
width: 100px;
min-height: 100%;
height: 100%;
background-color: #f21ce7;
}
#content_layout{
border-left: 100px solid #e4f662;
border-right: 100px solid #e4f662;
width: auto;
height: auto;
background-color: #c36161;
}
#content{
margin: auto;
width: 96%;
}
謝謝你的幫助。我會放手一搏! – Tino