div+css学习笔记01

<!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:0px; padding:0px;} 
body {
font-size: 12px; 
margin: 0px auto;
height: auto;
width: 805px;
}
.mainBox {
border: 1px dashed #0099CC;
margin: 3px;
padding: 0px;
float: left;
height: 300px;
width: 192px;
}
.mainBox h5 {
float: left;
height: 20px;
width: 179px;
color: #FFFFFF;
padding: 6px 3px 3px 10px;
background-color:#999999;
font-size: 16px;
}
.mainBox p {
line-height: 1.5em;
text-indent: 2em;
margin: 35px 5px 5px 5px;
}


</style>
</head>

<body>
<div class="mainBox">
<h5>Test1</h5>
<p>content</p>
</div>
<div class="mainBox">
<h5>Test2</h5>
<p>content </p>
</div>
<div class="mainBox">
<h5>Test3</h5>
<p>content </p>
</div>
<div class="mainBox">
<h5>Test4</h5>
<p>content </p>
</div>
</body>
</html>

posted on 2007-10-11 13:03  JetPeng  阅读(144)  评论(0)    收藏  举报

导航