Skip to content

Instantly share code, notes, and snippets.

@cheeyeo
Forked from ismasan/cross_browser_columns.html
Created February 10, 2011 09:59
Show Gist options
  • Save cheeyeo/820221 to your computer and use it in GitHub Desktop.
Save cheeyeo/820221 to your computer and use it in GitHub Desktop.
<!-- This is how you lay out cross-browser columns. Stick to this and you're golden -->
<style>
.clearfix:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
.clearfix {
display: inline-block;
}
html[xmlns] .clearfix {
display: block;
}
* html .clearfix {
height: 1%;
}
.column { width: 50%; float: left;}
</style>
<div class="clearfix" id="column_row>
<div class="column">
This is the first column
</div>
<div class="column">
This is the second column
</div>
<div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment