Implement a Sticky Footer
On pages with short content, the default theme may display an empty space below the footer, affecting the page's appearance.

Solution
To position the footer at the bottom of the screen, even on pages with minimal content, apply the following CSS adjustments:
- Modify the
.page-wrapperClass: - Set
min-height: 100vhto ensure the wrapper takes up the full viewport height. -
Use
display: flexandflex-flow: columnto align content vertically. -
Adjust the
#maincontentClass: - Apply
flex-grow: 1to make the main content section expand and fill remaining vertical space.
Implementation
To apply these CSS adjustments, add the following XML within the <body> section of your theme's default.xml file (e.g., Magento_Theme/layout/default.xml):
<referenceContainer name="page.wrapper" htmlClass="page-wrapper min-h-screen flex flex-col"/>
<referenceContainer name="main.content" htmlClass="page-main flex-grow"/>
These changes ensure the footer consistently "sticks" to the bottom of the screen, providing a more uniform layout across various screen sizes, with any extra space appearing above the footer.
