左右动态,中间固定左右固定,中间动态
左右动态,中间固定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>