CSS三列高度自适应布局
2007-05-22 09:28
399 查看
样式表:
<style type="text/css">...
body {...}{margin: 0;font-size: 12px;font-family: Verdana, Arial;text-align: center;}
div {...}{overflow: hidden;}
#body{...}{width:800px;margin: 0 auto;text-align: left;}
.sub{...}{width:200px;float:left}
#head,#foot{...}{background-color:black;width:800px;}
#middle{...}{width:400px;background-color:red;height:400px}
#left{...}{background-color:silver;height:500px }
#right{...}{background-color:blue;height:300px}
</style>
html:
<body>
<form id="form1" runat="server">
<div id="body">
<div id="head"></div>
<div id="mid">
<div id="left" class="sub">left</div>
<div id="middle" class="sub">middle</div>
<div id="right" class="sub">right</div>
</div>
<div id="foot"></div>
</div>
</form>
</body>
<style type="text/css">...
body {...}{margin: 0;font-size: 12px;font-family: Verdana, Arial;text-align: center;}
div {...}{overflow: hidden;}
#body{...}{width:800px;margin: 0 auto;text-align: left;}
.sub{...}{width:200px;float:left}
#head,#foot{...}{background-color:black;width:800px;}
#middle{...}{width:400px;background-color:red;height:400px}
#left{...}{background-color:silver;height:500px }
#right{...}{background-color:blue;height:300px}
</style>
html:
<body>
<form id="form1" runat="server">
<div id="body">
<div id="head"></div>
<div id="mid">
<div id="left" class="sub">left</div>
<div id="middle" class="sub">middle</div>
<div id="right" class="sub">right</div>
</div>
<div id="foot"></div>
</div>
</form>
</body>
相关文章推荐
- CSS学习笔记(6)--浮动,三列布局,高度宽度自适应
- [转]DIV布局之三行三列之高度自适应
- 前端设计之CSS布局:上中下三栏自适应高度CSS布局
- 一个不错的CSS DIV布局,DIV高度自适应
- 脚本控制三行三列自适应高度DIV布局
- css三列布局,左边两个div固定,最右边宽度自适应
- 完美的DIV三行三列自适应高度布局
- DIV+CSS布局中自适应高度的解决方法
- CSS布局:自适应高度的CSS布局
- 简单而兼容性好的Web自适应高度布局,纯CSS
- CSS__三列布局(两边固定,中间自适应)
- 脚本控制三行三列自适应高度DIV布局
- CSS实现左右栏宽度固定中间栏宽度变化且各栏高度自适应背景色不同的三栏布局
- css布局之三列布局中间自适应
- CSS三列布局两端固定宽度中间自适应
- js控制三列高度自适应DIV+CSS页面
- CSS之三列自适应布局
- DIV布局之三行三列之高度自适应
- 纯CSS实现三列布局(两边固定,中间自适应)
- CSS布局自适应高度解决方法