Witam mam takie pytanie co trzeba zrobić aby obrazki do siebie przylegały chodzi mi o to aby obrazek 4, 5, 6 przylagaly do obrazkow 1, 2 ,3.
Mam takie coś:

A chce mieć takie coś:

<img src="../images/portret/1.jpg" class="gallery_photos" style="width: 18.5%; height: 19%;"> <img src="../images/portret/2.jpg" class="gallery_photos" style="width: 18.5%; height: 19%;"> <img src="../images/portret/1.jpg" class="gallery_photos" style="width: 18.5%; height: 19%;"> <img src="../images/portret/1.jpg" class="gallery_photos" style="width: 18.5%; height: 40%;"> <img src="../images/portret/1.jpg" class="gallery_photos" style="width: 18.5%; height: 19%;"> <img src="../images/background.jpg" class="gallery_photos" style="width: 18.5%; height: 19%;"> <img src="../images/portret/1.jpg" class="gallery_photos" style="width: 18.5%; height: 19%;"> <img src="../images/portret/1.jpg" class="gallery_photos" style="width: 18.5%; height: 19%;"> <img src="../images/portret/2.jpg" class="gallery_photos" style="width: 18.5%; height: 19%;"> <img src="../images/portret/1.jpg" class="gallery_photos" style="width: 18.5%; height: 40%;"> <img src="../images/background.jpg" class="gallery_photos" style="width: 18.5%; height: 19%;"> <img src="../images/portret/1.jpg" class="gallery_photos" style="width: 18.5%; height: 19%;"> <img src="../images/portret/1.jpg" class="gallery_photos" style="width: 18.5%; height: 19%;"> <img src="../images/portret/1.jpg" class="gallery_photos" style="width: 18.5%; height: 19%;"> <img src="../images/portret/1.jpg" class="gallery_photos" style="width: 18.5%; height: 19%;">
css
#gallery{
margin-top: 10px;
margin-bottom: 40px;
width: 100%;
margin:0 auto;
text-align: center;
}
.gallery_photos{
background: #f7f8fa;
margin: 0.5%;
clear: none;
vertical-align: top;
}