I'm trying to create a layout with Bootstrap 3, which will be a repeating listing row:
- On the left, a fixed-width and height image
- On the right, an element containing multiple
.row
elements (each can vary in height)
I've got it partially working, but I've an issue where the first .row
on the right has the same height as the image (the .col
s inside are correct height). The other rows are then appearing below. I want to avoid defining absolute heights on each row.
I've put an example on jsfiddle: http://jsfiddle.net/yszAs/
Also, I'm not sure if its ok/recommended, but I've given the right-hand-side element a class of container
, which appears to help resolve parts of rows extending beyond the container.
Any ideas what I'm doing wrong?
Update
Thanks for the suggestions, but they're not quite what I'm looking to achieve.
I've already got the part where I need the first column to be a fixed width, and the second to fill the remaining space working. There could be an issue with my implementation of this though.
The issue is that the height of the content in the first column is dictating the height of the first element in the second
After a bit more digging, it looks like the clearfix
which appears to be automatically included in row
elements is causing the issue - because the first column (the image) is floated, the element gets this height.
I've tried giving the first element in the right column a float: left
, which solves the issue partially - I then have the problem of it being floated! (See http://jsfiddle.net/gKtE3/).
Any ideas?