I have dynamic content uploaded to a page, so there is an undetermined number of elements. I need them to be evenly distributed between the two columns, so I decided to set their width to 50%, and swimming them to the left would do the trick.
<div class="element">
<p>My content goes here!</p>
</div>
.element{float:left;width:50%;}
Example:
https://jsfiddle.net/fft75mu4/
But in the situation in my example, there is a space above the blue element, because the right element is higher than the first on the left. What is the recommended solution for this? I assume this is a common problem?
I would prefer not to create the actual columns in CSS, as the content is dynamic and the elements can be very tall / short, so a positive word of 5 on the left and 5 on the right does not always work.
source
share