0

ここに私の Aspx コードがあり、ページが展開されている間、フッターは常に一番下にある必要があります

お待ちください...> Powered By FFReporting" CssClass="フッター" Font-Italic="false"Font-Bold="false" Font-Size="X-Small" ForeColor="#000">

ここにcssファイルがあります

.wrapper
{
    min-height: 99%;
    height: auto !important;
    height: 100%;
    margin: 0 auto -15px;  /* ;the bottom margin is the negative value of the footer's height */
    padding: 0;
}
.footer, .push
{
    height: 16px; /* .push must be the same height as .footer */
    clear: both;
    text-align: center;
    /*font: 10px Verdana, Arial;*/
    font: 10px Arial;
    background: url("../Images/invida_06.jpg") repeat-x;
    /*background-color: #497097;*/
    color: White !important;
}

ページの情報が少ない場合も、常に一番下にある必要がありますが、ページに表示されるデータが多い場合は、すべてのデータの後に常に印刷されます

このサイトにあるすべてを試しましたが、解決策が見つかりません。助けて!!!

4

2 に答える 2

2

この手法は常に機能します。スティッキー フッターと呼ばれます。

于 2013-04-15T06:15:37.463 に答える
1

このコードに慣れました

これはCSSコードの例です

html, body {height: 100%;}

#wrap {min-height: 100%;background:red;}

#main {overflow:auto;
padding-bottom: 180px;}  /* must be same height as the footer */
#footer {position: relative;background:green;
margin-top: -180px; /* negative value of footer height */
        height: 180px;
        clear:both;} 

HTML

<div id="wrap">

    <div id="main">

    </div>

</div>

<div id="footer">

</div>

ライブデモ

于 2013-04-15T06:20:31.237 に答える