来自另一个页面的锚点不能在Firefox和IE中工作(适用于Chrome) [英] Anchor from another page not working in Firefox and IE (works in Chrome)

查看:133
本文介绍了来自另一个页面的锚点不能在Firefox和IE中工作(适用于Chrome)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



网站主页上有3个定位标签。当访问者在主页上时,所有这些定位标记都能正常工作,但只有其中的2个定位标记可在其他页面中使用。



该网站是 http://sm.retriogroup.com



点击菜单,如果您访问另一个页面,如 sm.retriogroup.com/galleryrel =nofollow> http://sm.retriogroup.com/gallery ,然后使用相同的链接,只有菜单和联系人链接正常工作。 位置链接始终移到主页的底部,而不是锚点。 (在Chrome中,页面加载到正确的锚点)



锚链接的HTML是相同的,使用ID作为锚点名称。



令人沮丧的是,如果您使用 http://sm.retriogroup.com/#location 链接,它不起作用。但是,一旦你在主页上再次点击Locations,那么锚点就没有问题了!

解决方案

这个问题是通过系统地删除页面上的内容逐一进行的。

问题原来与通过JavaScript生成的页面上的滑块相关。在滑块的容器上设置高度解决了问题。


I've inherited a site with a problem that's driving me nuts in Firefox and IE.

There are 3 anchor tags on the site's home page. All of these anchor tags work when the visitor is on the home page, but only 2 of them work when used from other pages.

The site is http://sm.retriogroup.com

Clicking on "Menus," "Locations" or "Contact" in the header menu brings the page to the right anchor.

If you visit another page such as http://sm.retriogroup.com/gallery and then use the same links, only the "Menus" and "Contact" links work properly. The "Locations" link always goes to the bottom of the home page instead of to the anchor. (In Chrome, the page loads at the correct anchor point)

The HTML for the anchor links is the same, using an ID as the anchor name. I don't understand why this particular one isn't working, while the others do.

Frustratingly, if you use the http://sm.retriogroup.com/#location link from another page, it doesn't work. But then once you're on the home page again and click "Locations," then the anchor loads no problem!

解决方案

Discovered the problem by systematically erasing content on the page one-by-one.

Problem turned out to be related to a slider on the page that was being generated through javascript. Setting a height on the slider's container solved the problem.

这篇关于来自另一个页面的锚点不能在Firefox和IE中工作(适用于Chrome)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆