今天实现一个简单网页的布局,页面规划如图

页面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>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
<title>6+7.制作简单页面之ps布局+css布局</title>
<link rel="stylesheet" type="text/css" href="css/hdw.css" />
</head>
<body>
<div class="container">
<div class="header">header</div>
<div class="content">content</div>
<div class="leftmenu">leftmenu</div>
<div class="footer">footer</div>
<div>
</body>
</html>
css文件如下:
*{padding:0;margin:0}
body{
font-size:12px;
background:#d4d4d4;
}
.container{
width:720px;
margin:0px;
background:#fff;
}
.header{
height:90px;
background:#b0b0b0;
}
.content{
width:520px;
height:1098px;
background:#eee;
float:right;
}
.leftmenu{
width:180px;
height:200px;
background:#eee;
}
.footer{
height:50px;
background:#b0b0b0;
clear:both;
}
浙公网安备 33010602011771号