December 27, 2013 09:30 pm GMT
Original Link: http://css-tricks.com/make-sure-columns-dont-collapse-horizontally/
Make Sure Your Columns Dont Collapse Horizontally
You might be familiar with elements collapsing vertically. If an element only contains other elements that are floated, the parent element will collapse to zero height. We often employ the clear fix for that. But if an element doesn't contain anything, it can collapse horizontally as well, which can be quite awkward for layout.
Here's an example of some HTML for a three-column layout.
<div class="grid grid-bad"> <div class="col col-1-3"></div> <div class="col col-1-3"></div> <div class="col col-1-3"> I'm the last column. …
Make Sure Your Columns Don’t Collapse Horizontally is a post from CSS-Tricks
Original Link: http://css-tricks.com/make-sure-columns-dont-collapse-horizontally/
Share this article:
Tweet
View Full Article