Created
November 15, 2019 03:32
-
-
Save hachesilva/e02fd3a73e7f36caa601f6a1f73fd739 to your computer and use it in GitHub Desktop.
Sticky footer fexbox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Source: https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/ | |
The HTML | |
<body class="Site"> | |
<header>…</header> | |
<main class="Site-content">…</main> | |
<footer>…</footer> | |
</body> | |
The CSS | |
.Site { | |
display: flex; | |
min-height: 100vh; | |
flex-direction: column; | |
} | |
.Site-content { | |
flex: 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment