align div horizontally

Tuunade

New Member
I am creating an online shopping site for my project, in product list I used \[code\]float:left\[/code\] for listing them properly but the problem is the size of product div will be variable, if size of one div increases it ruins my listing design. please help methis is my code:HTML:\[code\]<div class="container"> <div class="unit" style="height:140px"> </div> <div class="unit"> </div> <div class="unit"> </div> <div class="unit"> </div> <div class="unit"> </div> <div class="unit"> </div> <div class="unit"> </div> <div class="unit"> </div> <div class="unit"> </div> <div class="unit"> </div> <div class="unit"> </div> <div class="unit"> </div> </div>\[/code\]CSS:\[code\].unit{float:left;width:170px;height:133px;border: 1px solid red;margin:5px;}\[/code\]this is fiddle link:http://jsfiddle.net/iiison/VPESu/thanks in advance :)
 
Back
Top