您的位置:首页 > Web前端 > CSS

CSS创建三栏网页布局---CSS基础教程

2007-04-30 14:39 841 查看
  <body>

  <div id="header">

  <h1>Header</h1>

  </div>

  <div id="left">

  软件音速--左

  </div>

  <div id="right">

  软件音速---右

  </div>

  <div id="middle">

  软件音速---中间  
           </div>

  <div id="footer">

  软件音速--页脚

  </div>

  </body>

  下面是CSS代码

  body {

  margin: 0px;

  padding: 0px;

  }

  div#header {

  clear: both;

  height: 50px;

  background-color: aqua;

  padding: 1px;

  }

  div#left {

  float: left;

  width: 150px;

  background-color: red;

  }

  div#right {

  float: right;

  width: 150px;

  background-color: green;

  }

  div#middle {

  padding: 0px 160px 5px 160px;

  margin: 0px;

  background-color: silver;

  }

  div#footer {

  clear: both;

  background-color: yellow;

  }
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: