Archived topic
Static homepage with no scroll
11 replies · Started by Ryan on April 16, 2022
Hey GP team,
I created a static homepage w/ Elements. Slight learning curve, but now that I understand it, it works really great!
Anyway, I have a slight vertical scroll on the homepage, even though there is no content below the fold. Is there any way to remove the vertical scroll?
Thanks in advance,
Ryan
Hi Ryan,
Any chance you can link us to the site in question?
You can use the private information field.
https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
Let me know :)
Hello Ying,
I added my website below. Let me know if there's anything to do about the scroll.
Also noticed the primary navigation bar on the homepage is not the same height as the rest of the site. Not sure how that happened but would love advice on how to fix.
Hi there,
your Container Block has min height setting of 100vh. So it is going to fill the viewport height in addition tot he nav and footer.
So, select the Container Block, and in Advanced > Additional CSS Class(es) add; fill-height
Then add this CSS to your site:
.fill-height {
min-height: calc(100vh - 117px);
}
The 117px is the combined height of the nav and the footer, and that is being deducted from the containers 100vh height.
NOTE - vertical scroll will still happen on smaller viewports....
Hi David,
I followed the steps by didn't see any change. Any other things to try?
Hi Ryan,
I can’t see the fill-height class added from my end. Can you confirm if you’ve added the class to the Container Block as such?: https://share.getcloudapp.com/YEur4Q2l
Can you also confirm if you’ve added the code provided by David in Appearance > Customize > Additional CSS.
If you’ve added these and they aren’t appearing, that would mean you most probably would need to clear all caching mechanisms set in your website.
Hope this clarifies! Kindly let us know. :)
Hi Fernando,
I removed them immediately after because I didn't want to leave the CSS on the site. I'll clear the cache and try again.
Alright, kindly let us know how it goes once you’ve applied the changes. :)
Ok, done! Still nothing. Hmmm..
I see that it’s been added now, however, the class seems to be added to a Child Container Block, Can you kindly add fill-height class to the outermost, parent Container Block instead?
Kindly let us know how it goes. :)
Bingo! Thanks, Fernando.
PS I have another question but I will start a new topic about it. Stay tuned...
You’re welcome Ryan! Glad that worked!
Alright, we’ll look forward to it. :)