I am trying to create an image grid using the collagePlus jQuery plugin. This is supposed to match all the images in the div inside the container. However, when I try to insert more than 4 images, it goes beyond the height of the container to fit the images, rather than downsizing the image to fit the container.
The code:
<html>
<link rel='stylesheet' href="css/collage.css">
<script src="js/jquery.js"></script>
<script src="js/jquery.collagePlus.js"></script>
<div style='height:200px; width:100%;max-height:200px;'>
<div class="Collage">
<img src="four.png"/>
<img src="four.png"/>
<img src="four.png"/>
<img src="four.png"/>
<img src="four.png"/>
<img src="four.png"/>
<img src="four.png"/>
<img src="four.png"/>
</div>
</div>
<script>
$('.Collage').collagePlus({'allowPartialLastRow' : true});
</script>
</html>
If anyone knows why this is happening and what I can do to fix it, I would really appreciate it.
source
share