javascript - HTML changeable div height with static width lots of divs -


i think knows site http://pinterest.com/ , don't want create site have purpose want create divs under divs static width , height changeable value.

i made html code here is: http://jsbin.com/ihekiv

<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>untitled document</title> <style type="text/css">     div{         margin: 5px;     }     .width-200{         width: 200px;     background-color: #fcf;     }     .float-left{         float: left;     } </style>   </head>  <body>      <div class="width-200 float-left color-01" style="height: 300px;">     </div>      <div class="width-200 float-left color-01" style="height: 250px;">     </div>      <div class="width-200 float-left color-01" style="height: 250px;">     </div>      <div class="width-200 float-left color-01" style="height: 250px;">     </div>      <div class="width-200 float-left color-01" style="height: 250px;">     </div>      <div class="width-200 float-left color-01" style="height: 250px;">     </div>      <div class="width-200 float-left color-01" style="height: 250px;">     </div>      <div class="width-200 float-left color-01" style="height: 250px;">     </div>      <div class="width-200 float-left color-01" style="height: 250px;">     </div>  </body> </html> 

in html code can see div 5 not going under div 1 how can take div 5 under div one. may div 1 change height may divs change height want know how can when divs height getting changeable. please tell me how this.

css can't this, because have variable number of columns.

instead, use jquery masonry: http://masonry.desandro.com/

there's no-framework version, vanilla masonry: http://vanilla-masonry.desandro.com/


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -