But if you want the main part of your page (without the footer) to be pushed up by the footer, you should wrap it in a div or main element and set its height in css to calc(100vh - footer height) or use javascript to calculate its height dynamicly:
Another solution that comes to mind is to define all css values as relative (percentage or viewport). For instance your footer could take up 15vh, the header 25vh and the main section 60vh. Then you could use percentage values to assign hights to segments inside the main section