Created
August 24, 2017 15:57
-
-
Save pumano/4b8e8f2b5637bfcc346acca4193814b6 to your computer and use it in GitHub Desktop.
HTML and CSS for sticky dashboard layout
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> | |
<link rel="stylesheet" href="styles.css"> | |
</head> | |
<body> | |
<div class="wrapper"> | |
<aside> | |
<ul> | |
<li>Home</li> | |
<li>Home</li> | |
<li>Home</li> | |
</ul> | |
</aside> | |
<section> | |
<header>My Header</header> | |
<div class="content-wrapper"> | |
<main> | |
Content here | |
</main> | |
</div> | |
</section> | |
</div> | |
</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
body { | |
margin: 0; | |
} | |
.wrapper { | |
display: flex; | |
overflow: hidden; | |
} | |
aside { | |
width: 170px; | |
height: 100vh; | |
background-color: #333; | |
color: #fff; | |
} | |
section { | |
width: 100%; | |
height: 100vh; | |
} | |
header { | |
height: 50px; | |
background-color: #CCC; | |
} | |
.content-wrapper { | |
min-height: 700px; | |
height: 100%; | |
overflow: scroll; | |
} | |
main { | |
height: 100%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment