Support Forum

Scrolling to top of sections

Hi Ivo,

Before asking my actual question, let me share some hapiness with you :D I have been working on a new website with Lawyer the past few weeks and I experienced once again the great usability of your templates and Gantry 5. Now that I get more used to how things work (thanks to your videos and documentation!) the process becomes faster and even more fun. I like the newest particles very much. So just a note from a happy customer!

About my question, maybe beyond support, don't hesitate to tell me if it's beyond the support.

In Milano, I have a menu with some sub menu items. All the content is on one page. The sub menu items are just URLs that should jump to the sections.
I found this solution: I add an Id in the particle title field like this:


<span class="anchor" id="my-id"></span>


In CSS I add the necessary padding, which is the 90px of the fixed header + the title-padding of 48px:


.anchor {
display: block;
height: 138px;
margin-top: -138px;
visibility: hidden;
}


This works perfectly, as long as I stay on this page - for example /voor-organisaties - and click the sub menu item Event creation.
But, if I go to the home page, and click the same sub menu item (with the exact same URL: /voor-organisaties#event-creation !) there is some hick-up and the section moves up a little bit.

I have been searching for solutions all afternoon, without success... I thought that maybe the to-top-particle would have something to do with it but it seems that that it not the problem.

Maybe this way to achieve this is not the right one in Milano? I could send you the URL in a PM :o

Have a nice evening!
With kind regards,
Stefan
Responses (4)
Sorry, but you are not allowed to view the replies here.
Your Reply

Become an insider | Subscribe to our Newsletter
Subscribe to our mailing list and stay up-to-date with all our awesome releases, latest updates and amazing discount offers!