Used petrapixel's amazing tutorial to make an image gallery but it broke it when I tried to add a decorative border to an individual image. Ideally I'd like to have this clover border around each image in the gallery. I don't know where to start with troubleshooting this. Below is css and then the html. Thanks so much!!!
.crafts-image-gallery div {
position: relative;
box-sizing: border-box;
width: calc(25% - 10px);
margin: 5px;
border: 5px solid;
}
.crafts-image-gallery div img {
width: 100%;
height: 100%;
object-fit: cover;
}
.crafts-image-gallery {
display: flex;
flex-wrap: wrap;
}
/* Captions */
.crafts-image-gallery div span {
position: absolute;
bottom: 15px;
left: 0;
width: 100%;
box-sizing: border-box;
background: white;
color: black;
text-align: center;
padding: 5px 10px;
font-size: 20px;
opacity: 0;
transform: translateY(100px);
transition: transform 0.4s ease, opacity 0.5s ease;
}
/* Captions on Hover */
.crafts-image-gallery div:hover span {
opacity: 1;
transform: none;
}
.clover-box {
margin: auto;
width: 100%
}
.clover-u01 {
background: url("https://bluupandaland.neocities.org/site%20graphics/decoration/pasture%20deco/clover_f-ue.gif") repeat-x;
height: 16px ;
margin: 0 16px
}
.clover-s01 {
background: url("https://bluupandaland.neocities.org/site%20graphics/decoration/pasture%20deco/clover_f-sita.gif") repeat-x;
height: 16px ;
margin: 0 16px
}
.clover-box-top {
background-image: url("https://bluupandaland.neocities.org/site%20graphics/decoration/pasture%20deco/clover_f-kado1.gif") , url("https://bluupandaland.neocities.org/site%20graphics/decoration/pasture%20deco/clover_f-kado2.gif");
background-position: top left , top right;
background-repeat: no-repeat , no-repeat;
height: 16px
}
.clover-box-center {
background-image: url("https://bluupandaland.neocities.org/site%20graphics/decoration/pasture%20deco/clover_f-migi.gif") , url("https://bluupandaland.neocities.org/site%20graphics/decoration/pasture%20deco/clover_f-hidari.gif");
background-position: top right , top left;
background-repeat: repeat-y , repeat-y
}
.clover-box-inner {
background:#fff;
margin: 0 16px
}
.clover-box-bottom {
background-image: url("https://bluupandaland.neocities.org/site%20graphics/decoration/pasture%20deco/clover_f-kado3.gif"), url("https://bluupandaland.neocities.org/site%20graphics/decoration/pasture%20deco/clover_f-kado4.gif");
background-position: top left , top right;
background-repeat: no-repeat , no-repeat;
height: 16px
}
And then the html is:
<div class="crafts-image-gallery">
<!--image post start-->
<div class= "clover-box12"><div class= "clover-box-top"><div class= "clover-u01"></div></div><div class= "clover-box-center"><div class= "clover-box-inner">
<div> <img src="https://bluupandaland.neocities.org/pasture%20photos/sightings/mario%20party%207%20sheep%20model.JPG" /> <span>Image 1</span>
</div>
</div></div><div class= "clover-box-bottom"><div class= "clover-s01"></div></div></div>
<!--image post end-->
<div> <img src="https://bluupandaland.neocities.org/pasture%20photos/sightings/mario%20party%207%20sheep%20model.JPG" /> <span>Image 2</span>
</div>
<div> <img src="https://bluupandaland.neocities.org/pasture%20photos/sightings/mario%20party%207%20sheep%20model.JPG" /> <span>Image 3</span>
</div>
<div> <img src="https://bluupandaland.neocities.org/pasture%20photos/sightings/mario%20party%207%20sheep%20model.JPG" /> <span>Image 4</span>
</div>
<div> <img src="https://bluupandaland.neocities.org/pasture%20photos/sightings/mario%20party%207%20sheep%20model.JPG" /> <span>Image 5</span>
</div>
<div> <img src="https://bluupandaland.neocities.org/pasture%20photos/sightings/mario%20party%207%20sheep%20model.JPG" /> <span>Image 6</span>
</div>
<div> <img src="https://bluupandaland.neocities.org/pasture%20photos/sightings/mario%20party%207%20sheep%20model.JPG" /> <span>Image 7</span>
</div>
<div> <img src="https://bluupandaland.neocities.org/pasture%20photos/sightings/mario%20party%207%20sheep%20model.JPG" /> <span>Image 8</span>
</div>
<div> <img src="https://bluupandaland.neocities.org/pasture%20photos/sightings/mario%20party%207%20sheep%20model.JPG" /> <span>Image 9</span>
</div>
<div> <img src="https://bluupandaland.neocities.org/pasture%20photos/sightings/mario%20party%207%20sheep%20model.JPG" /> <span>Image 10</span>
</div>
</div>