私はウェブサイトで作業していて、真ん中に960コンテナを使用していますが、唯一の問題は、デザイナーがいくつかdiv
ので異なる背景色を使用していることです。
したがって、今のところ私のコードは次のとおりです。
<div id="content">
<!-- the content needs to 960 on the width only the background need the full width of the page -->
<div class="whitebackground">
<!-- content -->
</div>
<div class="bluebackground">
<!-- content -->
</div>
</div>
css:
#content {
margin: 0px auto;
min-height: 700px;
position: relative;
width: 960px;
}
.whitebackground{
width: 100%;
background:#FFF;
}
.bluebackground{
width: 100%;
background:#0054fe;
}
ここで問題となるのは、sの背景色がdiv
もちろんコンテンツ内にのみあることdiv
です。の色をdiv
コンテンツの外に出しdiv
てページの幅全体に表示する方法はありますか?
これが作業コードですhttp://jsfiddle.net/6cJVV/