Link anchor to another page does not work only in your browser
There are internal pages containing an anchor link (in the red button in the header) to the section on the main page on the site http://shelkovina.ru:
<a href="index.html#order-block"> <button type = "submit" class = "btn btn-red">Заказать комбинезон</ button> </a>.
In the section on the main page: <section class = "section-order" id = "order-block">.
Every browser redirects link to its destination but Mozilla doesn't (only in the Mozilla transition is carried out in the footer). Locally everything works, but when you host files on the hosting, the problem is appear.
Thank you for your answers!
Изменено
Все ответы (5)
(*) In the section on the main page (index.html): section class = "section-order" id = "order-block".
Изменено
Look that it is working for me since I get a page with a (login?) form if I click the red Order button.
Note that such special anchors are usually processed by JavaScript, so make sure that you do not block JavaScript.
If you use extensions ("3-bar" menu button or Tools -> Add-ons -> Extensions) that can block (wanted) content (e.g. Adblock Plus, NoScript, Ghostery, uBlock Origin) always make sure such extensions do not block (wanted) content.
- make sure your extensions and filters are updated to the latest version
Thank you for your answer! But it was said about going to the link from the internal page ("Почему мы", "История компании", "faq"). The anchor link on the main page works correctly. The beauty of the method used in the project is in simplicity (only "id" in section and href="page#id" in a link ), in the absence of need to use javascript, so the question about blocking javascript unfortunately is not important in my case.
You can check the Web Console (Tools -> Web Developer) for security related messages about unsafe content.
- "3-bar" menu button or Tools -> Web Developer
- https://developer.mozilla.org/en/Tools/Web_Console
When Firefox goes to the wrong part of the page, it often is due to an incorrect prediction about the height of other parts of the page. When the target is below the point Firefox goes to, it's usually because images loaded above that point, pushing down the target. When the target is above the point Firefox goes to, it's likely due to change made to the page by a script that compacted content above the target. Maybe it's a bug that Firefox doesn't maintain the position, but let's set that aside and think about a workaround.
When I compare the body dimensions (Web Console, Inspector, Computed styles panel), I see:
- Scripts enabled: 12652.7 pixels
- Scripts disabled: 15416.7 pixels
Comparing a couple of full-page screenshots, it appears to be due to this section:
<section class="slider-review">
Can you run this after collapsing the slider, to reposition the page at the hash?
var h=location.hash; if (h.length > 1) document.getElementById(h.substr(1)).scrollIntoView(true);
Edit: Alternately, if there is a way to use CSS to specify the final height of the slider from the outset, that would be less hacky.
Изменено