左右动态,中间固定左右固定,中间动态

左右动态,中间固定css部分代码
<style type="text/css">
#header,#content,#footer{
 background-color:#ccc;
 border:1px solid #0c0;
 height:30px;
 width:80%;
 margin:10px auto;
 }
#content{
 height:500px;
 }
#left{
 height:500px;
 width:50%;
 float:left;
 margin-left:-50px;
 }
#left1{
  
 height:500px;
 
 background-color:#966;
 margin-left:50px;
 border:1px red solid;
 }
#cont{
 background-color:#000;
 float:left;
 height:500px;
 width:100px;
 }
#right{
 height:500px;
    width:49.7%;
 float:right;
 margin-right:-50px;
 }
 
#right1{
 height:500px;
 background-color:#c96;
 margin-right:50px;
 
 border:1px red solid;
 
 }
</style>

左右动态,中间固定html部分代码

<body>
<div id="header"></div>
<div id="content">
<div id="left">
<div id="left1"></div>
</div>
<div id="cont"></div>
<div id="right">
<div id="right1"></div>
</div>
</div>
<div id="footer"></div>


</body>

左右固定,中间动态css部分代码

<style type="text/css">
#header,#content,#footer{
 background-color:#ccc;
 border:1px solid #0c0;
 height:30px;
 width:80%;
 margin:10px auto;
 }
#content{
  height:500px;
  }
#left{
   height:500px;
   width:100px;
   float:left;
  border:1px red solid;
   background-color: #C36;
   
   }
#center{
   width:99.2%;  
   height:500px;
   float:left;
   margin-left:-200px;
   
   }   
#center1{  
   height:500px;
   background-color:#090;
   margin-left:200px;

   }
#right{
      width:98px;
    height:500px;
    float:right;
   border:1px red solid;
    background-color:#c96;
    }

</style>

左右固定,中间动态html部分代码


<body>
<div id="header"></div>
<div id="content">
<div id="left"></div>
<div id="center">
<div id="center1"></div>
</div>
<div id="right"></div>

</div>
<div id="footer"></div>

</body>

转载于:https://www.cnblogs.com/yanzhuan/archive/2011/11/04/2235254.html

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值