Tips and Tricks
Equalize column heights for fluid/responsive layouts
If you're working on a multi column grid layout you likely end up with uneven column heights if those columns contain text. Giving the columns a fixed height to make them equal wouldn't be a good solution since the text may not fit on smaller screens or the columns are too height.
There are several options to make the column heights even in fluid layouts though. The simplest, pure CSS based solution to this issue is described below.
Problem:
If no height is specified for the columns they automatically adjust there heights to the amount of text they contain.
Desired Result:
Column have equal heights no matter how much text they contain. The column with the most text dictates the height of the others.
Solution:
First you need to add a container div element for the row in the HTML markup. In the CSS you add a "overflow: hidden;" declaration to the rule that styles the row container.
Finally you give all the divs that should have the equal height a very large bottom-padding and an equally large negative bottom-margin. If the parent element (in this case the row-container) has a "hidden" value for the overflow it'll hide the large overlaps of the column divs and visually equalizes their heights.
Columns without text will behave the same way if you'd apply the "equalize" class (see below) to those divs (in this case column 2-1 and 2-5).
HTML code:
<span class="pink"><div class="row-container clear"></span><br />
<br />
<div class="column-20 min-height-05 clear"><p>2-1</p></div><br />
<br />
<div class="column-20 min-height-05 border-r-05 <span class="pink">equalize</span>"><br />
<p>Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.</p><br />
</div><br />
<br />
<div class="column-20 min-height-05 border-r-05 <span class="pink">equalize</span>"><br />
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p><br />
</div><br />
<br />
<div class="column-20 min-height-05 border-r-05 <span class="pink">equalize</span>"><br />
<p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. </p><br />
</div><br />
<br />
<div class="column-20 min-height-05"><p>2-5</p></div><br />
<br />
<span class="pink"></div></span><!-- end of row-container --><br />
.row-container { <br>
overflow: hidden; <br>
clear: both; <br>
} <br>
.equalize { <br>
padding-bottom: 9999px; <br>
margin-bottom: -9999px; <br>
} <br>