Skip to content

Instantly share code, notes, and snippets.

@artofhuman
Created August 26, 2012 07:39
Show Gist options
  • Save artofhuman/3475754 to your computer and use it in GitHub Desktop.
Save artofhuman/3475754 to your computer and use it in GitHub Desktop.
CSS:cols with same height
CSS
.b-cols_layout_cols_2_same_height .b-cols__col_position_left{
width: 50%;
float:left;
}
.b-cols_layout_cols_2_same_height .b-cols__col_position_right{
width: 100%;
float:left;
margin:0 0 0 100%;
}
.b-cols_layout_cols_2_same_height .b-cols__left-col-content {
float:left;
width:100%;
margin:0 0 0 -100%;
}
.b-cols_layout_cols_2_same_height .b-cols__right-col-content {
float:left;
}
HTML
{
block: 'b-cols',
mix: [{block: 'b-content'}, {block: 'i-clearfix'}],
mods: {layout: 'cols_2_same_height'},
content: [
{
elem: 'col',
elemMods: {position: 'left'},
content: {
elem: 'col',
elemMods: {position: 'right'},
content: [
{
elem: 'left-col-content',
content: 'left'
},
{
elem: 'right-col-content',
content: 'right'
}
]
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment