我需要添加一个侧边栏,它占据页面其余部分的高度,但是当其中有许多元素在y轴上滚动时。
我在网上看到的解决方案的问题是,一旦页面中的元素比页面高,边栏就会增长,并且没有滚动。
我有两列,左边一列有一个div,上面写着:Jam in your hood...和下面是侧栏。
右边是一张地图。
我怎么能有侧栏..。占用页面的重放空间,但如果里面的元素更高,则滚动?
使用twitter bootstrap (2),我有一个带有导航栏的简单页面,我想在container中添加一个高度为100%的div (在屏幕底部)。我的css-fu已经生锈了,我解决不了这个问题。
简单的HTML:
<body>
<div class="navbar navbar-fixed-top">
<!-- Rest of nav bar chopped from here -->
</div>
<div class="container fill">
<div
我已经为这个问题挣扎了一个多小时了,我就是搞不好。
<div class="main">
<div class="header">This is the header</div>
<div class="content">
<div class="top-container">This is the top content container</div>
<div class="bottom-co
但是,当我应用float时,我尝试将div浮动放在右边:向右,并使页面大小随着浏览器而变小,div位于前一个div之下。
HTML
<div id="container">
<div id="navbar-container">
<div id="mainlogo">
</div>
<div id="sublogo">
This is a subtitle test
</div>
<div id=