Created
December 30, 2021 06:18
-
-
Save enggsuraj/b1ddff1bee21a0fd333cd59014cfe9be to your computer and use it in GitHub Desktop.
Stickty Footer at bottom without overlapping content
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
* { | |
margin: 0; | |
padding: 0; | |
box-sizing: border-box; | |
} | |
.container { | |
display: flex; | |
flex-direction: column; | |
min-height: 100vh; | |
} | |
.content { | |
padding-bottom: 10px; | |
min-height: 100%; | |
} | |
footer { | |
flex: 0 0 50px; /*or just height:50px;*/ | |
margin-top: auto; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="container"> | |
<div class="content"> | |
<!-- DYNAMIC CONTENT --> | |
</div> | |
<footer> | |
Copyright@demo 2022 | |
</footer> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment