简单的html5布局

时间:2024-01-10 15:19:44

<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head>
<style>
html,body{height:auto;}
#main{width:1024px;margin:0 auto;height:auto}
header{width:100%;height:120px;border:1px solid #ccc;margin:5px auto}
nav{width:100%;height:40px;margin:5px auto;border:1px solid #F0F;}
aside{width:180px;height:400px;float:left;border:1px solid #F00;}
#content{width:820px;height:400px;float:right;border:1px solid #0F0}
footer{width:100%;height:80px;margin:5px auto;border:1px solid #00F;}
.clear{ clear:both; width:0px; height:0px; visibility:hidden; overflow:hidden;}
</style>
</head>
<body>
<section id="main">
<header>
</header>
<nav></nav>
<aside></aside>
<section id="content"></section>
<div class="clear"></div>
<footer></footer>
</section>
</body>
</html>