62,046
社区成员
发帖
与我相关
我的任务
分享
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div id="main">
<div id="divleft" style="float: left; width: 220px; height: 300px; border: 1px solid red">
左边div
</div>
<div id="divcenter" style="margin-left: 228px; margin-right: 228px; border-width: 1px 3px 3px 1px;
border-color: #ced7ce; border-style: solid; background: #fff; padding: 10px 10px 10px;
position: relative; border: 1px solid red; height: 300px;">
中间div
</div>
<div id="divright" style="float: right; height: 500px; width: 220px; border: 1px solid red">
右边div
</div>
</div>
<div id="bottom" style="padding: 15px 0; line-height: 120%; background: #4aa6bd;
border-top: 2px solid #bde3ef; text-align: center; font-style: normal; color: #fff; border: 1px solid red;height:100px;">
底部div
</div>
</form>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div id="main">
<div id="divleft" style="float: left; width: 220px; height: 300px; border: 1px solid red">
左边div
</div>
<div id="divcenter" style="margin-left: 228px; margin-right: 228px; border-width: 1px 3px 3px 1px;
border-color: #ced7ce; border-style: solid; background: #fff; padding: 10px 10px 10px;
position: relative; border: 1px solid red; height: 300px;">
中间div
</div>
<div id="divright" style="margin-top: -300px;float: right; height: 300px; width: 220px; border: 1px solid red">
右边div
</div>
</div>
<div id="bottom" style="padding: 15px 0; line-height: 120%; background: #4aa6bd;
border-top: 2px solid #bde3ef; text-align: center; font-style: normal; color: #fff; border: 1px solid red;height:100px;">
底部div
</div>
</form>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
body, div {
margin:0px;
padding:0px;
}
#main {
width:1000px;
margin:0px auto;
}
#divleft {
float: left;
width: 220px;
height: 300px;
background-color: #99FF00;
}
#divcenter {
float:left;
width:540px;
background: #fff;
padding: 10px;
height: 300px;
background-color: #66CCFF;
}
#divright {
float: left;
height: 500px;
width: 220px;
background-color: #CC99CC;
}
#bottom {
clear:both;
height:100px;
background-color: #FF9999;
}
</style>
</head>
<body>
<div id="main">
<div id="divleft"> 左边div </div>
<div id="divcenter"> 中间div </div>
<div id="divright"> 右边div </div>
<div id="bottom"> 底部div </div>
</div>
</body>
</html>
<div id="main">
<div id="divleft" style="float: left; width: 220px; height: 300px; border: 1px solid red;">
左边div
</div>
<div id="divcenter" style="margin-right: 228px; border-width: 1px 3px 3px 1px;
border-color: #ced7ce; float:left; border-style: solid; background: #fff; padding: 10px 10px 10px;
position: relative; border: 1px solid red; height: 280px;">
中间div
</div>
<div id="divright" style="float: right; height: 300px; width: 220px; border: 1px solid red">
右边div
</div>
</div>
<div id="bottom" style="padding: 15px 0; width:100%; line-height: 120%; background: #4aa6bd;
border-top: 2px solid #bde3ef; text-align: center; font-style: normal; color: #fff; border: 1px solid red;height:100px;">
底部div
</div>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
* {
margin:0;
padding:0;
}
.box{
width:100%;
font-size:12px;
float:left; }
.leftdiv{
float:left;
width:200px;
height:600px;
background:#f00;
}
.middlediv{
background:#0f0;
height:600px;
margin:0 200px;
}
.rightdiv{
float:right;
width:200px;
height:600px;
background:#00f;
}
-->
</style>
</head>
<body>
<div class="box">
<div class="leftdiv">此处显示 class "leftdiv" 的内容</div>
<div class="rightdiv">此处显示 class "rightdiv" 的内容</div>
<div class="middlediv">此处显示 class "box" 的内容</div>
</div>
<div id="bottom" style="padding: 15px 0; line-height: 120%; background: #4aa6bd;
border-top: 2px solid #bde3ef; text-align: center; font-style: normal; color:
#fff; border: 1px solid red;height:100px;">
底部div
</div>
</body>
</html>