-3

ヘルプ!私は初心者で、深刻な助けが必要です! Dreamweaver のテンプレート (2 列のリキッド) から使用した 2 列のレイアウトがあります。サイトのほとんどの準備が整いましたが、ブラウザーで開くと、まったく異なって見えました。のテキストと画像.containerが に漏れてい.sidebar1ます。サイドバーをfloat: leftに、コンテナをに設定しましたfloat: rightが、試したことはありません。助けてください!私は今夜​​これを理解する必要があります!よろしくお願いします!

.sidebar1 {
    float: left;
    width: 180px;
    background-color: #C7776C;
    margin-bottom: -10000px;
    padding-bottom: 10000px;
    height: 100%;
    overflow: hidden;
}

.header {
    min-height: 160px;
    background-color: #E7C082;
}

.container {
    float: right;
    width: 993px;
    background-color: #FEF3C8; /* the auto value on the sides, coupled with the width, centers the layout */
    height: 100%;
    margin-top: 0;
    margin-bottom: auto;
    padding-bottom: 0;
    overflow: hidden;
    margin-left: 0;
} 
4

1 に答える 1

0

CSS コードを次のように変更してみてください。

.sidebar1 {
    position: absolute;
    top: 180px;
    width: 180px;
    background-color: #C7776C;
    height: 100%;
    overflow: hidden
}

.header {
    min-height: 160px;
    background-color: #E7C082;
}

.container {
    position: absolute;
    top: 180px;
    left: 200px;
    width: 993px;
    background-color: #FEF3C8; /* the auto value on the sides, coupled with the width,       centers the layout */
    height: 100%;
    margin-top: 0;
    margin-bottom: auto;
    padding-bottom: 0;
    overflow: hidden;
    margin-left: 0;
} 

ここに解決策があります:http://jsfiddle.net/pEdf2/2/

于 2013-04-22T01:33:28.730 に答える