Archived topic
Make footer at bottom when there's little content in the body
3 replies · Started by emanharout on December 31, 2020
Hi support team,
When my site has little content, the footer ends up being too high. Note I'm not looking to fix the footer to the bottom so that it always appears (I want users to scroll down to view the footer). But when there's little content, I want there to be extra spacing so the footer is at the bottom of the browser viewport.
Hi there,
You could use this css to add margin to top of the site footer in this specific page.
.error404 .site-footer {
margin-top: 500px;
}
Replace the .error404 with other page's class to apply the margin in another page.
Adding CSS: https://docs.generatepress.com/article/adding-css/
Let me know :)
Thanks Ying! Is there a simple way to add a class to a page?
Hi there,
you can try the CSS i provided here:
https://generatepress.com/forums/topic/cant-get-menu-nav-or-footer-to-be-sticky/#post-1232453
It will force the Footer to sit at the bottom of the viewport on any short page. But please check the site carefully, as this method may inadvertently affect other element of the page.