html中的佈局div

<!DOCTYPE html>
<html>
<head>
<style type="text/css">
div#container{width:1080px;height:1080px;}
div#header {background-color:yellow;}
div#menu {background-color:#ffff99;height:400px;width:300px;float:left;}
div#content {background-color:#EEEEEE;height:400px;width:350px;float:left;}
div#footer {background-color:#99bbbb;clear:both;text-align:center;}
h1 {margin-bottom:0;}
h2 {margin-bottom:0;font-size:18px;}
ul {margin:0;}
li {list-style:none;}
</style>
</head>

<body>

<div id="container">

<div id="header">
<h1>Main Title of Web Page</h1>
</div>

<div id="menu">
<h2>Menu</h2>
<ul>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
</ul>
</div>

<div id="content">Content goes here</div>

<div id="footer">Copyrighhoolt W3Sc.com.cn</div>

</div>

</body>
</html>
相關文章
相關標籤/搜索