Header and Footer Variable Heights

I’m wondering if there is any way for the height of the header and footer to be exported into separate variables so that we can use those for calls?

I have a footer that I want to ensure sticks to the bottom of the browser for short pages so I am using media queries to set a min-height but it’s based on subtracting the header height and footer height.

The height of the footer changes due to the copy that is within the footer, and the header also changes for desktop or mobile.

As device sizes narrow, the footer gains in height which means I have to write media queries for every time a word wraps to a new line. If the text ever changes then the height will change and the media queries will need to be rewritten.

Is there was a dynamic variable that the Theme sets then I could just reference that variable. It would make life a lot easier. Perpahs there is another way?

Maybe you guys could write something into the theme for this as well?

Thoughts?

Hello @dabigcheeze,

Thanks for writing to us.

Regretfully there is no option to get the height of the Header/Footer form any variable. It would require custom development. I would suggest you contact a developer who can assist you with your concern. Please note that we don’t provide custom development support it is out of the support scope.

Alternatively, you can use custom Javascript to get the height of the Header/Footer. Please have a look at this article for reference.

Thanks for understanding

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.