Div+CSS 制作三栏式页面布局(左右高度随中间内容自动调整)

以下为CSS文件内容,文件名为1.css

body { font: 100% 宋体, Arial, Helvetica, sans-serif; background: #666666; margin: 0px; padding: 0px; text-align: center; } #container { width: 780px; background: #FFFFFF; margin: 0px auto; padding: 0px; border: 0px; } #header { background: #DDDDDD; padding: 0px; margin:0px; width:100%; } #contentContainer { width: 100%; background: #FFFF00; padding:0px; margin:0px; overflow:hidden; } #contentLeft { background: #ff0000; float:left; padding: 0px; margin:0px; width:200px; padding-bottom:100000px; margin-bottom:-100000px; } #contentRight { background: #0000ff; float:left; padding: 0px; margin:0px; width:200px; padding-bottom:100000px; margin-bottom:-100000px; } #content { background: #00ff00; padding: 0px; margin:0px auto; width:380px; float:left; } #footer { clear:left; background: #DDDDDD; padding: 0px; margin:0px; width:100%; }

以下是HTML页面

<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>test</title> <link type="text/css" rel="stylesheet" href="1.css" mce_href="1.css" /> <mce:script type="text/javascript"></mce:script> </head> <body> <div id="container"> <div id="header"> 标题 </div> <div id="contentContainer"> <div id="contentLeft"> left </div> <div id="content"> content <br /> asf <br /> sdfsa <br /> safs </div> <div id="contentRight"> right </div> </div> <div id="footer"> 脚注 </div> </div> </body> </html>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值