1

ページ全体に 1 つの大きなコンテナーを持つ Web ページがあります。その中に<div>私は別のものを<div>持っていfloat:leftます。次に、その子の右側に、<div>他の を含む 2 番目のコンテナーがあります<div>。セカンダリ コンテナが崩壊しています。他の解決策を検索して試しましたが、何も解決しませんでした。ところで、これは html5 ページ<!DOCTYPE html>です。何か案は?CSS:

body {
    border: 0px;
    padding: 0px;
    margin: 0px;
    background: white;
    overflow: hidden;
    height: 100%;
    font-family: Hanuman;
}
#container {
    margin: 0 auto;
    background: red;
    height: 100%;
    width: 100%;
    overflow: hidden;
}
#bibletree {
    padding: 0;
    margin: 0;
    height: 100%;
    width: 15%;
    float: left;
    background: blue;
    overflow: auto;
    white-space:nowrap;
}
#container2 {
    margin: 0 auto;
    height: 100%;
    width: 85%;
    background: gray;
    float: right;
    overflow: auto;
}

html:

<div id="container">
     <div id="bibletree">
          stuff here
     </div>
     <div id="container2">
          there will be two other divs here as well. This one is collapsing.
     </div> 
</div>
4

2 に答える 2

2

こんにちはbodyhtml height 100%

このように

body, html{
height:100%;
}

デモ

于 2012-08-30T04:41:36.583 に答える
0

これで問題は解決しますか?

(のルールに追加overflow:hiddenしますか?)#container2

于 2012-08-30T04:43:36.567 に答える