这是我的jsFiddle
在我的 Fiddle 链接中,我浮动了我的左侧边栏和右侧边栏。据我所知,浮动元素已从 html 正常流程中删除。我只是不明白为什么它正在取代我的右侧边栏。
<div class="content-area">
<div class="left-sidebar"></div>
<div class="main-area">hi</div>
<div class="right-sidebar"></div>
我的CSS:
.content-area {
background-color: #bbb;
height: 310px;
}
.left-sidebar {
float: left;
width: 50px;
height: 100%;
background-color: #abcdef;
}
.right-sidebar {
float: right;
width: 50px;
height: 100%;
background-color: #abcdef;
}