I am new to Bootstrap and I am having a problem with clearfix
. I am trying to design a website with 3 content columns (of variable height) and a 4th column with a fixed width for advertising.
<div class="container-fluid">
<!-- ad column with fixed width 300px -->
<div class="col-fixed-width"></div>
<!-- content columns -->
<div class="col-md-4"></div>
<div class="col-md-4"></div>
<div class="col-md-4"></div>
<div class="clearfix"></div>
<div class="col-md-4"></div>
<div class="col-md-4"></div>
<div class="col-md-4"></div>
</div>
The class col-fixed looks like this:
.col-fixed {
width: 318px;
float: right;
}
Everything else is standard bootstrap. Because the height of my advertising column is much larger than the height of the content elements there is a large gap between the first and second row. How do I solve this? Can I either:
- Ignore specific
divs
in regard to the use ofclearfix
? - use a different grid layout?
Thanks in advance for any help or hint!