Is it possible to get two fluid column wells with uneven column data length to be the same height?
Asked
Active
Viewed 1.6k times
16
-
sorry! the search came up right after i posted – ina May 27 '12 at 04:44
-
Actually, the other post is a fixed layout and the solution does not seem to work for fluid columns – ina May 27 '12 at 04:48
1 Answers
26
Here's a responsive CSS solution, based on adding a large padding and an equally large negative margin to each column, then wrapping the entire row in in a class with overflow hidden.
.col{
margin-bottom: -99999px;
padding-bottom: 99999px;
background-color:#ffc;
}
.col-wrap{
overflow: hidden;
}
You can see it working at jsFiddle
EDIT
A variation if you want equal height wells or columns with rounded corners:
http://jsfiddle.net/panchroma/4Pyhj/
EDIT
Another variation with equal height wells or columns with rounded corners, this time for Bootstrap 3
http://jsfiddle.net/panchroma/D4xdE/
It's more or less the same as with Bootstap 2, but with some refinements to accomodate a change in how BS spaces the column grids now.

David Taiaroa
- 25,157
- 7
- 62
- 50
-
1Because this just makes the columns really large and hides the "really large" bit it doesn't work when columns have rounded borders, as the bottom of each column is hidden. – Rob Gray Feb 19 '13 at 21:28
-