谁能用div+css简单写个布局给小女子看下下么``急求!谢谢!
用div+css简单写个布局出来我想看下下``正在学习``有点不懂`` [code]<!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>xhtml</title>
<style type="text/css">
<!--
body{ font-size:14px;}
.header,.main,.footer{ margin:0 auto; width:600px; border:1px #CCCCCC dashed; padding:10px;}
.main,.footer{ margin-top:10px;}
-->
</style>
</head>
<body>
<div class="header">我页头</div>
<div class="main">
<p>我是内容</p>
<p>这里面可以写很多东西</p>
<p> </p>
<p> </p>
<p> </p>
</div>
<div class="footer">我是页脚</div>
</body>
</html>[/code]看一下,这个是比较简单和标准的div+css页面
[[i] 本帖最后由 寅生 于 2008-3-27 18:09 编辑 [/i]] 可以另存别人的网页到本地 就可以了
三行三列布局
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="Author" content="自在放下|[email]ly0079@126.com[/email]" />
<title>三行三列布局</title>
<style type="text/css">
<!--
body{
margin-top:0px;background:#bbb;color:#666;text-align: center;font-family:verdana,arial,helvetica,sans-serif;}
#header {margin-right:auto;margin-left:auto;background:#eee;width:776px;padding:0px;height:60px;text-align:left;}
#mainbox{margin-right:auto;margin-left:auto;width:776px;}
#mainboxbg{float:left;padding:0px;width:776px;background:#60a179;}
#right{float:right;padding:0px;width:188px;margin: 2px 0px 2px 0px;background: #cbcfdd;text-align:left;}
#left{float:left;padding:0px;width:188px;margin: -20px 2px 2px 0px;background: #cbcfdd;text-align:left;}
#center{float:left;padding:0px;width:396px;margin: 2px 0px 2px 190px;background: #ccc;text-align:left;}
#footer {text-align:left;clear: both;margin-right: auto;margin-left: auto;padding: 0px;width:776px;background: #EEE;height: 60px;}
.text {margin:0px;padding:20px;}-->
</style></head>
<body>
<div id="header"><b>Header</B></div>
<div id="mainbox">
<div id="mainboxbg">
<div id="right">
<div class="text">右边</div></div>
<div id="center">
<div class="text">中间</div></div>
<div id="left">
<div class="text">左边</div></div>
<div id="footer"><b>Footer</B></div>
</div></div></body></html>
[[i] 本帖最后由 nihl009 于 2008-3-31 12:32 编辑 [/i]]
页:
[1]
