Bootstrap Grid Column Clearing
I'm having a hard time understanding the column clearfix structure in bootstrap. I'm trying to create a card layout, which needs the rows in the layout to all be the same height,
Solution 1:
I don't know if this answer can help you.
Your div content is already changing as you said, so a way will be to ask javascript when document is ready.
Just have to check the max height of each targeted div, and apply it at each div.
Here is a kind of code in action : http://bootply.com/103561
Just that, I'm sorry because when I wrote the code, I was in clouds, and the var mini
is not significative, it should be named 'maxi
'...
And this same code in visu :
$(document).ready( makeDivSimilar );
functionmakeDivSimilar()
{
var mini = 0;
$('.col-md-4').each(function(){
if(parseInt($(this).css('height')) > mini )
{
mini = parseInt($(this).css('height'));
}
});
$('.col-md-4').css('height',mini);
}
Post a Comment for "Bootstrap Grid Column Clearing"