2012-02-28 69 views
0

我有一個簡單的頁腳,我想固定在瀏覽器的底部。我想只能垂直調整它的大小。我遇到的問題是,一旦我應用了jQuery UI可重新定義的大小,它將相對位置設置爲明顯混淆佈局原意。jQuery UI可調整大小簡單固定頁腳?

下面是一個使用我的問題JSBin一個簡單的例子。

http://jsbin.com/ubuhic/

想法?

+0

我不知道,在Chrome中看起來相當好的 – 2012-02-28 17:33:38

+0

應該固定到瀏覽器的底部。 – aherrick 2012-02-28 17:34:27

+0

....編輯:只需添加'important'到'位置:fixed'你'footer' CSS。我加入了答案完全CSS ... – 2012-02-28 17:40:04

回答

-1
footer 
{ 
    height: 200px; 
    bottom: 0px; 
    position: fixed !important; 
    width: 100%; 
    background-color: #cc0000; 
} 

!important應該做的伎倆......

+0

看起來是越來越近了,但只要我開始調整它再次跳躍在我身上。你看到那種行爲了嗎? – aherrick 2012-02-28 17:44:49

+0

這並不能完全解決問題 – aherrick 2012-02-28 19:04:22

2
$(function() { 

    $('footer').resizable({ 
    handles: 'n, s' 
    }).bind('resize', function(){ 
     $(this).css("top", "auto"); 
    }); 

}); 

此代碼的工作完美的我。 http://jsbin.com/ubuhic/11