我正在尝试使用 twitter-bootstrap 框架为我的应用程序设计一个管理面板,但我无法让我的布局正常工作。
我受到这种设计的启发:
这将是一个两列布局“侧边栏”和“主要内容”,但我无法让 100% 的高度工作。我设法使用此代码获得 2 列布局,宽度为 100%:
HTML
<div class="container-fluid">
<div class="row-fluid">
<div class="span2 colorize-white">
<!--Sidebar content-->Sidebar
</div>
<div class="span10 colorize-white">
<!--Body content-->Main
</div>
</div>
</div>
CSS
/* Global */
html, body {
color: #6B787F;
padding: 0;
height: 100%;
background: #11161a;
font-family: 'PT Sans' !important;
}
.colorize-white {
background: #FFFFFF;
}
.no-margin {
margin: 0;
}
我已经完成了一半,但有两件事我无法解决。
1) 100% 高度
2) 去掉第二张图片的外边距
You can see that I have margin between browser border and Sidebar/Main elements and then margin between the two. I need to get rid of this if I add no-margin to all my elements in HTML i pasted including body tag i still don't get 100% height and i still cant get rid of margins between browser border and sidebar and main content while the margin space between Sidebar and Main content disappears.