I've been struggling with this issue for a long time and have yet to find a satisfactory solution, so I've decided to seek help.
HTML
<section class="cols-2">
<div class="wrapper">
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos
</div>
<div class="wrapper">
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos
</div>
</section>
<section …
CSS
.cols-2 .wrapper {
margin:0;
float: left;
width: 50%;
}
In my code, I have two columns floated within the section.cols-2
. However, the section
does not automatically adjust its height.
For instance, if I want to add another floated section
immediately after this one, I cannot create a margin between the two section
s.
Instead of specifying a height
value, I simply need a specific margin to separate both section
s from each other.
Check out my example: http://jsfiddle.net/kWtev/
Any tips and tricks you can provide would be greatly appreciated. Thank you!