我剛開始製作HTML,我需要一個寬度爲100%
的容器和一個980像素和中心對齊的包裝。 我剛剛在JSFIDDLE中粘貼了我的代碼。 代碼有什麼問題?基本div;容器和包裝
#section-1{
background: #f7f3ed;
margin: 0 auto;
width: 100%;
max-width: 1300px;
position: relative;
padding: 30px 0 100px 0;
border: 2px solid red;
}
#section-1 h2{
font-size: 32px;
font-family: 'Helvetica Neue';
margin-bottom: 20px;
}
.wrapper-1{
text-align: center;
width: 980px;
background: #fff;
border: 2px solid blue;
position: relative;
}
<div id="section-1" class="wrapper-1">
<h2>Hey this is just a test</h2>
</div>
你到底在問什麼?你想應用垂直居中嗎? – ppoliani
*我需要一個100%寬度的容器和一個980px的包裝器*我不明白你想要什麼。 – DaniP