我在將標題保持在固定位置時集中所有內容時出現問題。任何人都可以幫我弄清楚爲什麼?將標題保持在固定位置時居中問題
這裏是我的HTML
<div id="wrapper">
<div class="header">....</div>
<div class="experiences">...</div>
</div>
這裏是CSS:
#wrapper {
margin: 0 auto 0 auto;
width: 1000px;
height: auto;
}
.header {
background-color: #222;
color: white;
top: 0;
left: 0;
right: 0;
position: fixed;
height: 130px;
padding: 20px;
width: 1000px;
margin: 0 auto 0 auto;
}
.experiences {
background-color: #eee;
padding: 20px;
* padding-top: 190px;
width: 1000px;
margin-top: 170px;
}
你想要居中的是什麼?經驗div中的文字? –