Last active
July 19, 2018 20:47
-
-
Save gregoryagu/eb3fe8684e93d1528c829b0b5490b447 to your computer and use it in GitHub Desktop.
Stretch last item to fill available height using Flex Box with Boostrap 4.1 (not 4 which is missing flex-fill)
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 lang="en"> | |
<head> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css"> | |
<meta charset="utf-8"> | |
<title>GistRun</title> | |
<link rel="stylesheet" href="styles.css"> | |
</head> | |
<body> | |
<script src="script.js"></script> | |
<div class="border d-flex flex-column" style="height:350px; background-color:pink;" > | |
<div class="p-2 border">Item</div> | |
<div class="p-2 border">Item</div> | |
<div class="p-2 border">Item</div> | |
<div class="p-2 border">Item</div> | |
<div class="p-2 border">Item</div> | |
<div class="p-2 border flex-fill" >Stretch to fill</div> | |
</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
console.log('Hello World!'); |
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
/* todo: add styles */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment