2011-12-15 77 views
0

I have set a tag name at the top of the 'comments' section, with<a name> causes content to be pushed up

<a name="comments"></a> 

I go into this by the following:

<a href="page-on-my-site#comments">Comments</a> 

Going into the page in any other way works fine, if however I use this ' a tagname', all the content is pushed up.

Take a look on my site for clarity: http://www.cristianrgreco.com/

對於頂部文章,按'閱讀更多'的工作正常,但如果你點擊'2評論'它側重於評論,但推動內容。

這從來沒有發生過我,所以我真的不知道如何解決它。

在此先感謝

+0

它發生是因爲#content_wrapper的內容滾動。 – 2011-12-15 00:58:55

+0

我希望它只是將頁面向下滾動到該部分,有什麼方法可以修復它? – Cristian 2011-12-15 01:01:29

回答

3

問題是由overflow:hidden和滾動共同造成的。你需要做一些修改:

首先改變

<a name="comments"></a> 

<a id="comments"></a> 

添加下面的CSS規則,使其實際定位在頁面上的正確位置:

#comments{ 
    float: left; 
    clear: left; 
} 

刪除overflow:hidden#content_wrapper並將其添加到改爲。

相關問題