Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 2591

[3.3.x] Styles Support & Discussion • Re: footer always at bottom

$
0
0
Yup. Flex is the way to do it. Exactly how you use it depends on your style's markup, but essentially you set flex-direction: column; on a suitable parent element, then set flex: none; on the header and footer elements and flex: 1 0 auto; on the element you use to push the footer to the bottom of the page.

For example, with markup like this...

Code:

<body><header></header><main></main><footer></footer></body>
You would use:

Code:

body {display: flex;flex-direction: column;}header, footer {flex: none;}main {flex: 1 0 auto;}

Statistics: Posted by Gumboots — Fri May 02, 2025 6:14 pm



Viewing all articles
Browse latest Browse all 2591

Trending Articles