开发者

HTML Bookmark + CSS Overflow:Hidden - disappearing content?

In my page header, I have an image div with overflow:hidden.

In the content area, I have an bookmark anchor tag:

<a name="arghargh"></a>

At the top of the content area, I have a link to the bookmark:

<a href="#arghargh">go the the bookmark</a>

When I click the link, the content disappears, leaving only everything outside of the content div.

I found this post describing the exact same issue. Ba开发者_如何转开发sed on that, I removed the overflow:hidden, and everything works fine, except that I need overlow:hidden for the page formatting to work correctly.

Help!

Update

It appears that, with overflow:hidden, the bookmark is causing the div to scroll internally, which moves all of the content up until the bookmark tag is at the top of the visible area. This is not cool.


Remove overflow:hidden and add <div style="clear:both"></div> as last inner element to keep the page formatting to work correctly.


Can't you just use id="arghargh" on the div instead of an anchor tag? Does the problem still occur then?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜