My goal is to create a sticky footer with specific requirements:
- The footer should have position:fixed;
- Its height should adjust based on:
- The number of child .sub-menu items added by the user (which can vary)
- The changes in font-size due to media queries and viewport units "vw"
There are two media query instances that affect the font size:
- One for devices/screens below 980px
- Another for devices/screens above 1550px
I want the footer to always be at the bottom of the page while ensuring its child elements appear above it. However, as the number of .sub-menu items increases, the footer's height grows accordingly. Additionally, changes in font size due to viewport width also impact the element's height.
[CSS code here]
Can anyone help me keep the footer in a fixed position regardless of the .sub-menu items, viewport dimensions, and font-size? Any PHP-based solution for WordPress would also be appreciated.
To summarize, I'm looking to rearrange my footer menu HTML so that parent menu items come after their children. While CSS transformations like "translateY(n)" have helped achieve this partially, they introduce too many variables. Thank you!