のリンクを貼り付けていません。 Firefoxではうまく動作しますが、IEやSafari/Chromeでは動作しません。ウィンドウが小さくなりすぎると、フッターは固定された位置からページの下部に置かれるより流動的なものに切り替わります。スティッキーフッターは、サイトへの
ウィンドウを短くしてページの一番下までスクロールし、スクロールバーが終了するまでページを展開すると、フッターはページの下部の約50〜100ピクセル上に位置します。誰がなぜこれが起こるのか知っていますか?
CSS:
html, body {
width: 100%;
height: 100%;
}
#wrap {
min-height:100% !important;
}
#wrap:before { /* Opera and IE8 "redraw" bug fix */
content:"";
float:left;
height:100%;
margin-top:-999em;
}
#container {
position: relative;
/*margin: 72px 0 172px 0;*/
top: 72px;
bottom: 172px;
width: 100%;
height: auto;
overflow: auto;
}
#top_navigation {
position: fixed;
min-width: 1010px;
width: 100%;
height: 72px;
background: url('../images/opaque.png') repeat;
text-transform: uppercase;
z-index: 2000;
}
#bottom_navigation {
position: fixed;
min-width: 1550px;
width: 100%;
height: 172px;
background: url('../images/opaque.png') repeat;
text-transform: uppercase;
}
Javascriptを:
int_window_width = $(window).width();
int_window_height = $(window).height();
if ((int_window_width <= int_min_window_width && int_window_height >= int_min_window_height) || int_window_height <= int_min_window_height) {
$('html').css('overflow-y', 'scroll');
$('#bottom_navigation').css('bottom', '');
$('#bottom_navigation').css('margin-top', '');
$('#bottom_navigation').css('position', 'relative');
}
if ((int_window_width >= int_min_window_width && int_window_height >= int_min_window_height) || int_window_height >= int_min_window_height) {
$('html').css('overflow-y', 'hidden');
$('#bottom_navigation').css('position', 'absolute');
$('#bottom_navigation').css('top', '');
$('#bottom_navigation').css('bottom', '0');
$('#bottom_navigation').css('margin-top', '');
}
このような意味ですか? http://jsfiddle.net/n6NQZ/これは修正されています。ページスクロールに基づいて固定値から絶対値に変更しますか? – Jay
@Jay、デモがIE6で動作しないことは知っていますか? –
これはIE6でも動作しています:http://jsfiddle.net/NDC3L/ – Jay