我做了一个一行三列的布局,不知道规范吗?下面是HTML代码:
<!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>
<title>网页布局</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="style.css" type="text/css" rel="stylesheet" />
</head><body bgcolor="#FFFFFF">
<div class="bigbox">
<div class="top"></div>
<div class="middle">
<div class="left"></div>
<div class="right"></div>
<div class="center"></div>
</div>
<div class="bottom"></div>
</div>
</body>
</html>
<!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>
<title>网页布局</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="style.css" type="text/css" rel="stylesheet" />
</head><body bgcolor="#FFFFFF">
<div class="bigbox">
<div class="top"></div>
<div class="middle">
<div class="left"></div>
<div class="right"></div>
<div class="center"></div>
</div>
<div class="bottom"></div>
</div>
</body>
</html>
body{ margin:0px}
.bigbox
{
width:960px;
margin:0 auto;
}
.top
{
height:100px;
border:1px solid #009900;
}
.middle
{
margin:10px 0 10px 0;
}
.left
{
width:250px;
height:500px;
border:1px solid #FF0000;
float:left;
}
.right
{
width:250px;
height:500px;
border:1px solid #FF0000;
float:right;
}
.center
{
width:434px;
height:500px;
border:1px solid #FF0000;
margin:0 10px 0 10px;
margin:0 auto;
}
.bottom
{
clear:both;
height:150px;
border:1px solid #009900;
}
<div id="all">
<div id="header">
<div id="content">
<div id="left">
<div id="right">
<div id="center">
<div id="footer">基础布局都是这样的