HTML左中右div布局

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8" />
	<title>Document</title>
	<style type="text/css">
		*{
			margin: 0;padding: 0
		}
		#wrap{  
			width:100%;  
			margin:0 auto;  
		}  
		#header{  
			/* margin:20px;   */
			height:80px;  
			border:solid 1px #0000FF;  
		}  
		#container{  
			position:relative;  
			margin-top:20px;  
			height:400px;  
		}  
		#left_side{  
			position:absolute;  
			top:0px;  
			left:0px;  
			border:solid 1px #0000FF;  
			width:170px;  
			height:100%;  
		}  
		#content{  
			margin:0px 190px 0px 190px;  
			border:solid 1px #0000FF;  
			height:100%;  
		}  
		#right_side{  
			position:absolute;  
			top:0px;  
			right:0px;  
			border:solid 1px #0000FF;  
			width:170px;  
			height:100%;  
		}  
		#footer{  
			margin-top:20px;  
			height:80px;  
			border:solid 1px #0000FF;  
		}  
	</style>
</head>
<body>
	<div id="wrap">  
		<div id="header">header</div>  
		<div id="container">  
			<div id="left_side">left_side</div>  
			<div id="content">content</div>  
			<div id="right_side">right-side</div>  
		</div>  
		<div id="footer">footer</div>  
	</div>  
</body>
</html>
发布了1201 篇原创文章 · 获赞 289 · 访问量 209万+

猜你喜欢

转载自blog.csdn.net/huangbaokang/article/details/104798981