A Pen by Shane Chin on CodePen.
Created
September 6, 2021 17:25
-
-
Save shanechin/afd1d61b5ec40677b98679201011b1c4 to your computer and use it in GitHub Desktop.
Scratchpad
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
<html> | |
<body> | |
<header>header</header> | |
<main id="main">main</main> | |
<footer>footer</footer> | |
</body> | |
</html> |
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
var words =["The sky", "above", "the port","was", "the color of television", "tuned", "to", "a dead channel", ".", "All", "this happened", "more or less","." ,"I", "had", "the story", "bit by bit", "from various people", "and", "as generally", "happens", "in such cases", "each time", "it", "was", "a different story","." ,"It", "was", "a pleasure", "to", "burn"]; | |
var text = []; | |
var x = 8000; | |
while(--x) text.push(words[Math.floor(Math.random() * words.length)]); | |
main = document.getElementById('main') | |
main.innerHTML= text.join(" ") |
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
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> |
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
html { | |
height: 100% | |
} | |
body{ | |
height: 100%; | |
display: flex; | |
flex-direction: column; | |
} | |
main { | |
flex-grow:1; | |
overflow: scroll; | |
} | |
header, footer { | |
height: 100px; | |
border: 1px solid gold; | |
flex-grow: 0; | |
flex-shrink: 0; | |
flex-basis: auto; | |
} |
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
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to get a mobile footer working