css圣杯布局

HTML 

<div class="container">
    <div class="content">contentdiv>
    <div class="left">leftdiv>
    <div class="right">rightdiv>
div>

 

css样式

.container{
		padding-left: 200px;
		padding-right: 150px;
}
.content {
	background: pink;
	width: 100%;
	float: left;
}
.left{
	width:200px;
	background: blue;
	float: left;
	margin-left: -100%;
	position: relative;
	right: 200px;
}
.right{
	width: 150px;
	background: green;
	float: left;
	margin-right: -150px;
}

  

转载于:https://www.cnblogs.com/lhyhappy365/p/11547475.html

你可能感兴趣的:(css圣杯布局)