第1个回答 2011-03-09
设定这两个层分别为x1和x2,宽度都为950像素,x1和x2的高度随各自的内容自动变化,x2可以自动适应x1。
<style type="text/css">
.x1{width:950px;height:auto;float:left;clear:both;}
.x2{width:950px;height:auto;float:left;clear:both;}
</style>
<div class="x1"></div>
<div class="x2"></div>本回答被提问者采纳