I’ve tried applying the Masonry http://masonry.desandro.com/ JS to make the images float under each other but it doesn’t seem to work.
I’ve used the following function – what have I done wrong? CSS issue maybe?
<script>
$(function(){
$('.cycler-wrap').masonry({
itemSelector: '.cycler-container',
columnWidth: 100
});
});
</script>
Updated the site as per Kelvin’s response below. Now just a cycle issue 🙁
The problem here is your
.cycle-containerelements are 0 pixels high, because yourimgelements are absolutely positioned, which takes them out of the document’s flow.If you make your
.cycler imgelementsposition:relativeinstead, masonry should work as expected. Since your images aredisplay:inline, to keep cycler working you actually only need to make the first imageposition:relative:Of course, not all browsers support
:first-child, so it might be better to just add a.firstclass to the first image in each group and use that as the selector instead.