Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <style>
- body,
- html {
- min-height: 100%;
- }
- .site-container {
- display: flex;
- min-height: 100%;
- flex-direction: column;
- }
- .header {
- position: sticky;
- top: 0;
- }
- .content {
- flex-grow: 1;
- }
- /* not important */
- body,
- html {
- margin: 0;
- }
- .header,
- .content,
- .footer {
- padding: 10px;
- }
- .header {
- background: #eeeeee;
- }
- .content {
- background: #dddddd;
- }
- .footer {
- background: #cccccc;
- }
- </style>
- </head>
- <body>
- <div class="site-container">
- <div class="header">Header</div>
- <div class="content">Content</div>
- <div class="footer">Footer</div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement