<body>
<div id="container">
<div id="mainContent">
<div id="sidebar">This is the sidebar</div>
<div id="sidebar">This is the sidebar</div>
<div id="sidebar">This is the sidebar</div>
</div>
<div id="mainContent">
<div id="sidebar">This is the sidebar</div>
<div id="sidebar">This is the sidebar</div>
<div id="sidebar">This is the sidebar</div>
</div>
</div>
</body>
</html>
这个,其实如果楼主要显示的是纯数据的话,我建议还是用table,DIV+CSS是布局方面有优势,但是并没有让人放弃TABLE的使用!所以数据显示方面还是继续沿用table比较好些!
LI的会更简单些,可以这样:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>3/2</title>
<style type="text/css">
body { font-family:Verdana; font-size:14px; margin:10 auto;}
#container {margin:0 auto; width:900px;}
#container ul{width:900px;list-style-type:none;}
#container ul li{background:#9ff;float:left;width:290px;height:100px;margin-left:5px;margin-bottom:5px}
</style>
</head>
<body>
<div id="container">
<ul>
<li>this is li1</li>
<li>this is li1</li>
<li>this is li1</li>
<li>this is li2</li>
<li>this is li2</li>
<li>this is li2</li>
</ul>
</div>
</body>
</html>