Created
July 18, 2012 11:27
-
-
Save andrewdh/3135694 to your computer and use it in GitHub Desktop.
Fluid column layout with fixed pixel margins between them.
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
/** | |
* Fluid column layout with fixed pixel margins between them. | |
*/ | |
.container { | |
width:50%; | |
height:10em; | |
padding-left:20px | |
} | |
.box { | |
height:100%; | |
width:33.33%; | |
float:left; | |
} | |
.first { | |
margin-left:-20px; | |
margin-right:10px; | |
background-color:hsla(20, 80%, 55%, 1); | |
} | |
.second { | |
margin-right:10px; | |
background-color:hsla(140, 80%, 55%, 1); | |
} | |
.last { | |
background-color:hsla(260, 80%, 55%, 1); | |
} |
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
<div class="container"> | |
<div class="box first">Column 1</div> | |
<div class="box second">Column 2</div> | |
<div class="box last">Column 3</div> | |
</div> |
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
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment