Skip to content

Instantly share code, notes, and snippets.

@artboard-studio
Created October 5, 2013 21:24
Show Gist options
  • Save artboard-studio/a69c16e0d51eaf4d3f4b to your computer and use it in GitHub Desktop.
Save artboard-studio/a69c16e0d51eaf4d3f4b to your computer and use it in GitHub Desktop.
Equal width columns
<style>
body { margin: 0; padding: 0}
#container {
position: absolute;
top: 30px; left: 50px;
bottom: 30px; right: 50px;
border: 1px solid #ccc
}
#container > div {
width: 33.3333333%;
height: 100%;
float: left;
}
#container div div {
height:100%;
}
#container div div.a {
background: red; margin-right: 7px
}
#container div div.b {
background: green; margin:0 8px;
}
#container div div.c {
background: blue; margin-left: 7px
}
</style>
<div id="container">
<div><div class="a">First</div></div>
<div><div class="b">Second</div></div>
<div><div class="c">Third</div></div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment