左侧固定 右侧自适应 布局

<!DOCTYPE html> 
<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<title></title> 
<style type="text/css"> 
* {margin:0; padding:0; list-style:none; } 
.wrapper{width: 100%; } 
.left {width:200px; background:#fcc; position:absolute; left:0 ;z-index:1; height:100px; } 
.right {width:100%; background:#ccc; position:absolute; left:0;} 
.content{margin-left:200px; background:#ffc; height:100px;} 

</style> 
</head> 
<body> 
<div class="wrapper"> 
    <div class="left">左侧固定宽度200px</div> 
    <div class="right"> 
        <div class="content01"> 
            右侧宽度自动适应 
        </div> 
    </div> 
</div> 
</body> 
</html> 

 

posted @ 2015-07-07 13:40  328201736  阅读(166)  评论(0编辑  收藏  举报