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

PHOTO EMBED

Mon Aug 29 2022 16:15:48 GMT+0000 (Coordinated Universal Time)

Saved by @marcopinero #html #css

<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>
content_copyCOPY

Single header / body / footer layout using css & flex.