日期:2013-07-26  浏览次数:21119 次

  这是div+css规划中经常会碰到的基础问题,团体觉得采用背景图填充的方法,还是比较简单和切实可行的。最终效果。

  CSS源代码:

  body{
  background: #EDEDED;
  font-size: 70%;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 130%;
  color: #666666;
  margin: 0;
  padding: 0;
  text-align: center;
  }
  #layout{
  width: 760px;/*--for ie5.x--*/
  w\idth: 740px;/*--other--*/
  margin: 10px auto;
  border: solid 10px #999999;
  border-bottom: solid 9px #999999;
  /*--底部要加个1px的DIV来清除浮动,所以把
  底边框设为9px--*/
  background: url(bg.gif) #FFFFFF repeat-y left;
  /*--背景填充,处理左右栏高度不分歧--*/
  text-align: left;
  }
  #sidel{
  float: left;
  width: 190px;
  }
  #sider{
  float: right;
  width: 540px;
  }
  pre{
  padding: 10px;
  margin: 0;
  }
  .clear{
  background: #999999;
  clear: both;
  height: 1px;
  overflow: hidden;
  }