Created
August 4, 2013 01:07
-
-
Save greggb/6148621 to your computer and use it in GitHub Desktop.
Three column layout
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> | |
| <meta name="description" content="BFC - 3 column layout" /> | |
| <meta charset=utf-8 /> | |
| <title>BFC - 3 column layout</title> | |
| </head> | |
| <body> | |
| <aside role="complementary"> | |
| Left column | |
| </aside> | |
| <div class="sidebar"> | |
| Right column | |
| </div> | |
| <main role="main"> | |
| This is the main content area. And it's stretchy! | |
| </main> | |
| </body> | |
| </html> | |
| aside { | |
| float: left; | |
| background: #ccc; | |
| width: 150px; | |
| margin-right: 20px; | |
| height: 400px; | |
| } | |
| .sidebar { | |
| float: right; | |
| width: 100px; | |
| margin-left: 20px; | |
| height: 400px; | |
| background: #ddd; | |
| } | |
| main { | |
| display: table-cell; | |
| width: 10000px; | |
| vertical-align: top; | |
| height: 400px; | |
| background: yellow; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment