Created
May 18, 2020 08:05
-
-
Save matt-bertoncello/c1e276a8e45c1e620fe1557b6e6ee68d to your computer and use it in GitHub Desktop.
CSS and HTML implementation of a div that is the size of the user's window. If the content in div is bigger, the container will expand.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<link rel="stylesheet" type="text/css" href="/stylesheets/windowsized_container.css" /> | |
</head> | |
<nav></nav> | |
<body> | |
<div class='full-page'> | |
Test. | |
</div> | |
</body> | |
</html> |
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
:root { | |
--header-height: 50px; | |
} | |
.full-page { | |
min-height: calc(100vh - var(--header-height)); | |
height: 100%; | |
display: flex; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment