如果在绝对定位时我可以在CSS中使section
流畅吗?
<div class="layout">
<aside>leftnav</aside>
<section>content fluid here</content>
</div>
aside {
width: 200px;
position: absolute;
left: 0;
top: 0;
}
section {
position: absolute;
top: 0;
left: 200px;
//fluid width to fill window
}
答案 0 :(得分:0)
编辑:使用绝对定位,只需添加:
section {
position: absolute;
top: 0;
left: 200px;
right: 0px; // this line
}
编辑结束。
在float
代码上使用aside
并向margin-left
添加section
:
aside {
width: 200px;
float: left;
}
section {
margin-left: 200px;
}