I'm currently trying to get jquery masonry to accomodate with different image heights, but it is not wanting to work.
CSS:
#container {
background-color:red;
width:1000px;
text-align:center;
margin: 0 auto;
}
.item {
float:left;
margin:10px;
width:275px;
background-color:red;
}
Jquery:
<script type="text/javascript" src="jquery-1.7.2.min.js"></script>
<script src="/jquery.masonry.min.js"></script>
<script>
$(function(){
$('#container').masonry({
// options
itemSelector : '.item',
columnWidth : 275
});
});
</script>
HTML:
<div id="container">
<div class="item"><img src="/green"></div>
<div class="item"><img src="/purple"></div>
<div class="item"><img src="/green"></div>
<div class="item"><img src="/green"></div>
<div class="item"><img src="/purple"></div>
<div class="item"><img src="/green"></div>
</div>
In an ideal world, the two purple squares would be beneath each other.
Interestingly, if I remove the jquery masonry, nothing changes.