我想要实现这个布局
_______________________
| |
| Table 1 |
|_______________________|
_______________________
| |
| Table 2 |
|_______________________| ___________________
| |
| bottom bar |
|___________________|
底部栏必须始终位于页面底部,紧靠表格右侧。这是我目前的代码。我有以下HTML代码:
<div class="container">
<div class="tables">
<div id="table1" class="box">
<table><tr><td>table 1</td></tr></table>
</div>
<div id="table2" class="box">
<table><tr><td>table 2</td></tr></table>
</div>
</div>
<div class="bottombar box"> bottom bar</div>
</div>
而这是关于CSS的内容
.container{ height: 1000px}
.tables{float: left}
.box{border: 1px solid #ddd; height:150px; width: 100px;}
.bottombar{float: left; position: fixed; bottom: 10px;}
这里是jsfiddle链接。
问题在于底部栏与表格重叠,但必须保持在表格右侧。如果我去掉固定位置,底部栏会停留在表格右侧,但不再附着在底部。有没有人能指导我解决这个问题?谢谢。