Archived topic
Scroll to Section within a page does not show the complete section
25 replies · Started by Sita on July 22, 2019
I changed the layout of my site to remove the drop downs in the menu tabs. I see a problem with scrolling to top of the sections.. the page scrools to the section but the top portion of the section is cut-off.
Here is my site https://www.gydesoft.com/ .
To illustrate what is happening, I click on the 'Support' tab to reveal three links: FAQ, How-To- , ContactUs.
Click on 'ContactUs' takes me past the beginning of the ContactUs section. I specified the smooth-scroll class in the settings for the sections.
What am I missing?
Thank you!
I don't see a smooth-scroll class added to the Contact Us link?
Hmmm..I see it :
Custom ID
ContactUs
Custom Classes
smooth-scroll
The smooth-scroll class should be in the link itself:
https://www.screencast.com/t/VvihZ7FyDs
Like this example here:
https://docs.generatepress.com/article/smooth-scroll/#regular-links
Hi Leo,
I am not able to get it to work:
Contact Us
When I try to enter this as the link for Contact Us, it adds an http:// at the beginning and will not work.
What am I doing wrong?
Thanks...
Where am I supposed to add the class smooth-scroll to the anchor element? Is it to added to the section which has the links? or is it to be added to the settings for the individual sections which are called upon from the main section? or is it to be added to the actual links themselves?
I tried adding it in different areas...but none seem to work... I guess I am not adding it in the correct place, or maybe not adding it correctly (but I copied it as is in the documentation...To add smooth scroll to regular links, simply give the element the smooth-scroll class.
Thanks...
Your HTML structure is wrong:
https://www.screencast.com/t/U11kRCSNb
Try this:
<a class="smooth-scroll" href="#ContactUs">Contact us</a>
Hi Leo,
I did enter as you mentioned above, but the http:// is being forced before it...I am not typing it in, and that is giving an error...Here is the screen shot:
https://www.screencast.com/users/siakgl/folders/Default/media/dd226867-b183-4678-9ca4-ae70fb7746e2
Sita
Ahh you are using the visual editor.
The code I provided needs to be added using text editor.
Got it, problem solved! I switched to the text editor and all good now!
Thank you Leo...
No problem :)