html - Float left elements do not stack -
i have problem floating elements. want when resize browser window box 3 right under box 1
html:
<div class="box"> <p>box 1</p> <p>box 1</p> <p>box 1</p> </div> <div class="box"> <p>box 2</p> <p>box 2</p> <p>box 2</p> <p>box 2</p> <p>box 2</p> </div> <div class="box"> <p>box 3</p> <p>box 3</p> <p>box 3</p> </div>
css:
.box { width:80px; float:left; border:1px solid slategrey; margin:0 0 0 10px; padding:10px; }
see fiddle: fiddle
i tried clear property nothing helps.
you can dynamic layout js. example masonry plugin.
Comments
Post a Comment