中间块用float或者flex布局,示例如下
<!doctype html>
<meta charset="utf-8" />
<style>
body{background:#e4de82}
.wrap{max-width:680px;margin:0 auto;background:#fff;padding:10px}
.header,.footer{height:100px;background:#a09483}
.body{overflow:hidden;height:400px;margin:5px 0;}
.body .aside{float:left;width:20%;background-color:pink;height:100%;border-right:solid 5px #fff}
.body .content{background:#9a97ce;height:100%;}
.footer{margin:0}
</style>
<div class="wrap">
<div class="header"></div>
<div class="body">
<div class="aside"></div>
<div class="content"></div>
</div>
<div class="header"></div>
</div>
div
您好,我是有问必答小助手,您的问题已经有小伙伴帮您解答,感谢您对有问必答的支持与关注!