0

i tried to setup the sticky footer from here

Here is the jsfiddle http://jsfiddle.net/pbhE8/

And my site: http://22twenty.com/Test

As you can see the footer is being pushed beyond the base of the content.

i can't post anymore links but i'm sure you can get the css, and anything else you might need from the site posted.

Hope someone can help

Denver

4

1 に答える 1

0

私はあなたがしたいことは、そのフッターdivをページの下部に貼り付けることですが、ページの中央にあるコンテンツと重ならないようにすることだと思います。私はこれまで「スティッキーフッター」を使用したことがありませんが、いくつかのサイトでこれを行ったことがあります。これは私が行っていることです(実際には、数週間前にここで尋ねた質問から来ました。

<div>サイトのコンテンツ全体の周りにあるを作成します。このdivのcssを次のように設定します。

#wrapper {
min-height: 100%;
width: 100%;
position: absolute;
}

あなたのサイトのメインコンテンツがcssで行くページの真ん中にコンテンツdivを作成します:

#maincontent {
width: 'some width';
height: 'some height';
margin-bottom: 'the height of the footer'
overflow: auto;
}

次に、フッターdivをcssを使用して「bottom」div内に埋め込みます。

#bottom {
width: 100%;
position: absolute;
bottom: 0;
}

次に、メインコンテンツdivのマージンがフッターdivと同じ高さである限り、それらはオーバーラップしませんが、フッターはブラウザウィンドウの下部に「スタック」している「bottom」divの内側にあります。

ご不明な点がある場合や、さらにサポートが必要な場合は、これがお役に立てば幸いです。

于 2012-08-23T23:34:18.823 に答える