开发者

HTML link within page breaks formatting

Okay, so - weird problem. Basically, I've created a PHP slideshow framework for my site which loads a whole new page each time somebody clicks to the next image. For a more "fluid" experience, I made the next/previous picture links load the next page so that the picture is at the top of the window (I put <a name='slide'></a> right above the slideshow image, and I link to that). However, when I do so, the page title disappears behind my banner at the top. They say a picture is worth a thousand words, so observe: This page looks fine, but click to go the next picture (broken page) and the album title (2010-0开发者_JS百科5) disappears. If you remove #slide from the end of the broken page link, it works fine again. Any suggestions on why this is happening, or how to avoid it?

TIA! :)


In the page:

<a name='slide'></a> 

...this an in-page bookmark. The #slide on the URL forces the page to scroll to this point.

If you want the page to load with it scrolled to the top every time, drop in this script:

<script type="text/javascript">
window.scrollTo(0,0)
</script>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜