2011-08-31 86 views
3

頁: http://www.serrupro.ca/index.php?option=com_content&view=article&id=5&Itemid=6&lang=frCSS溢出:隱藏錨頁面

相同的頁面,但鏈接到錨 http://www.serrupro.ca/index.php?option=com_content&view=article&id=5&Itemid=6&lang=fr#opportunites

我的左,右兩側向上移動。

所以我使用的保證金-4000和4000的填充方法,使我的左邊有一個白色的背景一路底部無論右側有多長/短。

該左和右側arer一個容器,該容器溢出內:隱藏;

這是我可以看到,可以使論文內容disapear的唯一的事情。沒有它,我的網頁無法正常工作。

我能做些什麼來解決這個問題?對於主播看起來似乎不是一種正常行爲。

感謝您的幫助提前

#topcontent { 
    position:relative; /* required for ie or 4000px padding/margin visible */ 
    background-color: #231f20; 
    border-left: 1px solid #231f20; 
    border-right: 1px solid #231f20; 
    overflow:hidden; 
} 
#topcontent .left { 
    position:relative; 
    width:703px; 
    margin-bottom:-4000px; 
    padding-bottom:4000px; 
    background:#FFF; 
} 
#topcontent .right { 
    width: 245px; 
    float: right; 
    margin-bottom:-4000px; 
    padding-bottom:4000px; 
} 

回答

2

呃,好,我不完全對你有一個答案 - 我傾向於使用背景圖像的方法,或者相同顏色的邊欄設計我的柱狀佈局。但是我發現在這個特別的「錯誤」一些文檔:

http://www.positioniseverything.net/articles/onetruelayout/appendix/equalheightproblems

老實說,我不知道除了一個JavaScript的解決方案,我總是試圖避開另一種替代方法。你將不得不做一些嚴肅的設計重構背景圖像,甚至成爲一種選擇。

祝你好運,我希望鏈接有點幫助 - 他們有一些解決方法

0

最快的解決方法是給填充,底部溢出:隱藏元素。你的情況,這將是

#topcontent { /* Any element with overflow: hidden property */ 
    padding-bottom: 18px; /* Value in px that will work for you */ 
}