div内容容器有80%的空间并挂在左边

时间:2014-05-27 23:18:11

标签: html css

看,我有这个:

http://pasteht.ml/r9x7G(来源:https://gist.github.com/AtomicCreeper/27c950967210959b47b1

我希望div菜单栏有20%的空间(减去边距)并挂到右侧

我希望div内容容器有80%的空间(减去边距)并挂到左边

我希望两个div在容器中并排。占百分比空间百分比的百分比。我喜欢div在页面中有80%的可用空间。

我做错了什么?老实说,我一无所知

1 个答案:

答案 0 :(得分:0)

尝试:

.tablebarz {
width: 20%;
margin-bottom: 30px;
/* margin-top: 50px; */
/* margin-left: 20px; */
/* margin-right: 5px; */
/* display: inline-block; */
float: right;
}

.roundedcontainer {
/* position: absoulute; */
margin-right: 25px;
border: 2px solid #ddd;
border-radius: 5px;
width: 74%;
float: left;
}