Div css頁面配置簡單實現

來源:互聯網
上載者:User
<!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>
相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.