html布局练习
代码如下:
<body>
<style>
#header {
background-color:black;
color:white;
text-align:center;
padding:5px;
width:600px;
}
#nav {
line-height:30px;
background-color:#eeeeee;
height:300px;
width:100px;
float:left;
padding:5px;
}
#section{
width:400px;
float:left;
padding:10px;
}
#footer{
background-color:black;
color:white;
clear:both;
text-align:center;
padding:5px;
width:600px;
}
</style>
<form id="form1" runat="server">
<div id="header">
<h1>City Gallery</h1>
</div>
<div id="nav">
London<br />
Paris<br />
Tokyp<br />
</div>
<div id="section">
<h1>London</h1>
<p>London is the capital city of England.</p>
<p>Standing on the River Thames,London has been a major settlement for two</p>
</div>
<div id="footer">
Copyright W3School.com.cn
</div>
</form>
</body>