は、だから私は#bottomBar
高さが数百ピクセル以上のすべての道を伸ばしなぜこのCSSのdivの100%の高さの問題
html,
body {
height: 100%;
margin: 0;
padding: 0;
}
#container {
height: 100%;
min-width: 900px;
min-height: 650px;
background: #dddbd9 url('../images/bg.jpg') no-repeat center center;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
overflow: hidden;
}
#content {
clear: both;
height: 345px;
position: relative;
margin: 0 auto;
width: 790px;
padding: 20px;
overflow: hidden;
}
#bottomBar {
height: 100%;
margin: 0 auto;
width: 100%;
padding: 0px;
background: #ffffff url('../images/bottomBG.jpg') 0 0 repeat-x;
}
<body>
<div id="container">
<div id="content"></div>
<div id="bottomBar"></div>
</div>
</body>
のようなHTML構造を持っています約115px?
更新:私は実際にはbottomBar
を115にしたいとは思っていません。それは底部の残りの領域全体を占めていますが、それ以上のウィンドウには伸びていません。ありがとう。
アップデート2:だから#content
は#container
が100%で、345pxで、いくつかの他のdivはコンテンツとbottomBar
の間に実際に存在し、どのように私は#bottomBar
の残りの高さを得るのですか?私はbottomBar
残りの領域を占有したいです。
#bottomBarの高さを背景画像の高さに合わせるには?その場合、 'height:115px'が必要です。 – jmar777
あなたは何を求めていますか? '#content'を100%の高さにし、'#bottomBar'を固定高さにしますか?あなたはそれが他の方法の周りにしたいですか?あなたはそれが流動的になりたいですか?私はあなたが達成しようとしていることを理解できません。 – Nightfirecat
bgイメージは、115pxだけでなく、ウィンドウの下部を占有したいRadienです。ありがとう。回答に感謝します。 – randomor