Photo Gallery Title Issue
I'm working on a photo gallery project where I want to add titles underneath each image. However, I'm facing a problem where the title is appearing next to the image instead of below it. You can see the issue in this screenshot.
Snippet from CSS Code
@media only screen and (max-width: 600px) {
.boxGallery {
margin-left: 50%;
margin-right: 50;
}
}
.GalleryBox {
display: block;
padding-left: 100px;
padding-right: 100px;
width: 100%;
}
.boxGallery {
display: block;
margin-left: auto;
margin-right: auto;
width: 80%;
}
div.gallery {
margin: 5px;
float: left;
width: 250px;
}
div.gallery img {
width: 250px;
height: 190px;
}
div.desc {
padding: 15px;
text-align: center;
}
<div class="boxGallery">
<div class="gallery">
<img src="https://placeimg.com/640/480/any">
</div>
<div class="gallery">
<img src="https://placeimg.com/640/480/any">
</div>
</div>
<div class="desc">
<p>Auvergne, Frankrijk 2018</p>
</div>
<div class="boxGallery">
<div class="gallery">
<img src="https://placeimg.com/640/480/any">
</div>
<div class="gallery">
<img src="https://placeimg.com/640/480/any">
</div>
</div>
If anyone knows how to resolve this issue, please provide some assistance.