CSS/flex: Header/Body/Footer layout using flex

<html> <head> <style type="text/css"> html, body { height: 100%; width: 100%; padding: 0; margin: 0; } body { display: flex; flex-direction: column; } header { height: 75px; } main { flex: auto; background-color: #ccc; } footer { height: 25px; } </style> </head> <body> <header>header</header> <main>main</main> <footer>footer</footer> </body> </html>
Single header / body / footer layout using css & flex.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.