2012-06-19 24 views
0

滑動工作小提琴但在滾動之前不正確的寬度是here。正確的佈局,但沒有滾動功能是here。還在學習CSS,但由於某些原因,如果我刪除了follwong固定浮動側CSS:預滾動CSS不同於後滾動

#commentWrapper { 
    position: absolute; 
    margin-left: 35px; 
    left: 450px; 
    width: 280px; 
} 

#comment { 
    position: absolute; 
    top: 0; 
    /* Can include margins in the sliding effect here */ 
} 

#comment.fixed { 
    position: fixed; 
    top: 0; 
} 

,位置是邊正確,但它確實沒有留在其固定的現在的位置,你向下滾動。將代碼保存在內,CSS出於某種原因會減小邊的寬度,但只要向下滾動,就會變得正常。我該如何修復它,使其在正確的位置和寬度的一側加載?

+0

你在OSX獅子? – bfavaretto

+0

10.6.8(雪豹) –

+0

我要說它可能與新的Lion的滾動條有關,但我只是在Windows中測試過,問題也在那裏。這似乎與您使用的相對寬度有關。如果您爲'

回答

1

我更新了你的CSS。 Take a look。我希望這能解決你的問題!

相關的代碼,我改變:

新:

#commentWrapper { 
float:right; 
margin-left: 10px; 
margin-right: 10px; 
left: 450px; 
width: 25%; 
} 

老:

#commentWrapper { 
    position: absolute; 
    margin-left: 35px; 
    left: 450px; 
    width: 280px; 
} 
+0

它固定了小提琴,而不是我的網頁,但它指出我正確的方向來修復我的。謝謝 –

+0

很高興我能幫忙! :) – Codeman