现在布局看起来像这样
我想要实现的是这个
<style type="text/css">
body { color: #4B5E6F; font-size: 11px; line-height: 1.8em; }
#main-content-wrapper { background: #F6F7F8; border-left: 1px solid #DBDFE2; border-right: 1px solid #DBDFE2; min-height: 400px; }
#content-left { float: left; width: 150px; min-height: 400px; background: #F6F7F8; }
#nav-left { list-style-image: none; margin: 0px; }
#nav-left li { margin: 6px 0px 6px 0px; }
#nav-left li .nav-parent { font-family: 'open_sans_extraboldregular'; text-transform: uppercase; color: #595F78; line-height: 22px; text-decoration: none; cursor: pointer; letter-spacing: 0px; margin: 0px 0px 0px 7px; font-size: 12px; }
#nav-left li .nav-sub { font-family: 'open_sansregular'; color: #595F78; line-height: 22px; text-decoration: none; cursor: pointer; letter-spacing: 0px; margin: 0px 0px 0px 5px; font-size: 11px; }
#content { float: left; border-left: 1px solid #DBDFE2; border-right: 1px solid #DBDFE2; min-height: 500px; width: 550px; padding: 10px; background: white; }
#content-right { float: left; width: 216px; padding: 10px; background: white; }
.nav-left-separator { background: url("resources/images/separator_menu.gif") repeat-x; height: 1px; display: block; margin: 0px 2px 0px 2px; }
.page-header { font-family: 'open_sansbold'; font-size: 16px; color: #8E354C; line-height: 22px; font-weight: normal; border-bottom: 1px solid #E4E7D4; margin-bottom: 15px; margin-top: 15px; }
ul { list-style-image: url('resources/images/fleche.gif'); margin: 4px 0px 0px 15px; }
ul li span { font-family: 'open_sansbold'; }
</style>
<div id="main-content-wrapper">
<div id="content-left">
<ul id="nav-left">
<li><a href="" class="nav-parent">Menu</a></li>
<li><span class="nav-left-separator"></span></li>
<li><a href="" class="nav-parent">Menu</a></li>
<li><span class="nav-left-separator"></span></li>
<li><a href="" class="nav-parent">Menu</a></li>
<li><a href="" class="nav-sub">Lorem</a></li>
<li><a href="" class="nav-sub">Lorem</a></li>
<li><a href="" class="nav-sub">Lorem</a></li>
<li><span class="nav-left-separator"></span></li>
<li><a href="" class="nav-parent">Menu</a></li>
<li><span class="nav-left-separator"></span></li>
<li><a href="" class="nav-parent">Menu</a></li>
<li><span class="nav-left-separator"></span></li>
<li><a href="" class="nav-parent">Menu</a></li>
</ul>
</div>
<div id="content">
<div class="page-header">Lorem ipsum dolor sit amet</div>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,
when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into
electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages,
and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</div>
<div id="content-right">
<div class="page-header">Lorem ipsum</div>
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
<div class="page-header">Lorem ipsum</div>
<ul>
<li><span>Overview</span></li>
<li><span>Overview</span></li>
<li><span>Overview</span></li>
<li><span>Overview</span></li>
</ul>
<div class="page-header">Lorem ipsum</div>
<ul>
<li><span>Overview</span></li>
<li><span>Overview</span></li>
<li><span>Overview</span></li>
<li><span>Overview</span></li>
</ul>
</div>
</div>
我希望左右的背景被着色而不是从中心着色,如果中心内容向下延伸,那么左右背景也需要用它们的颜色着色。有什么建议吗?不管怎么说,还是要谢谢你