1. 程式人生 > >Div css頁面佈局簡單實現

Div css頁面佈局簡單實現

<!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" />
<style>
body { margin:0; text-align:center}
#nav { background: #99FF99; height: 60px;width:1000px;float:none; }
#nav UL LI{ float:left;BORDER-LEFT: #497ab9 1px solid;BORDER-RIGHT: #2a5293 1px solid;}
#mainContent { background: #99FF99; height: 60px;width:1000px;float:none; }
#side { background: #99FF99; height: 300px; width: 120px; float: left; }
#side1 { background: #99FF99; height: 300px; width: 120px; float: right; }
#main { background: #99FFFF; height: 300px; margin:0 120px 0 120px; }
#foot { background: #99FF99; height: 60px;width:1000px;float:none; }
</style>
</head>
<body>
<div id="nav">
<UL>
  <LI class="start "><A href="

http://www.shiming8.com/">首頁</A> </LI>
  <LI><A href="http://www.shiming8.com/news/%22%3EIT資訊</A> </LI>
  <LI class=current><A href="http://www.shiming8.com/developer/">程式開發</A> </LI>
  <LI><A href="http://www.shiming8.com/os/">作業系統</A> </LI>
  <LI><A href="
http://www.shiming8.com/sysapp/
">應用技術</A> </LI>
  <LI><A href="http://www.shiming8.com/database/">資料庫</A> </LI>
  <LI><A href="http://www.shiming8.com/designer/">平面設計</A> </LI>
  <LI class="end "><A href="http://www.shiming8.com/media/">媒體動畫</A> </LI>
  </UL>
  </div>
<div id="mainContent">
<div id="side">此處顯示 id "side" 的內容</div>
<div id="side1">此處顯示 id "side1" 的內容</div>
<div id="main">此處顯示 id "main" 的內容</div>
</div>
<div id="foot">頁尾</div>
</body>
</html>

作者: 王德田 發表於 2011-06-01 14:19 原文連結

評論: 0 檢視評論 發表評論

網站導航:部落格園首頁  我的園子  新聞  快閃記憶體  小組  博問  知識庫