On my e-commerce site's product display page, I am facing some alignment issues. There will be around 100 products on this page and I want to display them in a matrix format.
<div style=" margin: 0 auto; width:640px; text-align: left">
<div class="leftcol" >left column 1
<p>my text</p>
<p>my text</p>
</div>
<div class="leftcol" >right column
<p>my textmy text my text my text</p>
</div>
<div class="leftcol" >left column
<p>my text</p>
<p>my text</p>
<p>my text</p>
<p>my text</p>
<p>my text</p>
</div>
<div class="leftcol" >right column
<p>my textmy text my text my text</p>
<p>my text</p>
<p>my text</p>
<p>my text</p>
<p>my text</p>
<p>my text</p>
<p>my text</p>
<p>my text</p>
<p>my text</p>
</div>
<div class="leftcol" >
left column 2
<p>my text</p>
<p>my text</p>
<p>my text</p>
<p>my text</p>
<p>my text</p>
</div>
In my CSS:
.leftcol{width: 200px;background:yellow;margin-right:10px;float:left; }
All product divs are the same size of 200px
, but the height of the divs will vary. I aim to display the divs similar to what is seen on Pinterest.
The display should look like this:
I would like to eliminate the gaps between the divs by filling them with the next set of divs. Visit this site for an example: [http://pinterest.com/][1] http://pinterest.com/