I am currently working on a new project using HTML, CSS, and Bootstrap. However, I have encountered a problem. I have created a box with a border all around it, and when I hover over this box, an image appears inside of it. By default, the inside of the box is set to white. When I copy and paste the code for this box underneath the first box and repeat the process, I end up with 3 divs which is exactly what I want. The issue I am facing is that the top border of my middle box is not showing. Can anyone help me with this?
Below is the code for one of my boxes:
<div>
<a class="text-decoration-none" href="">
<div class="po-relative mb-2">
<img src="images/lukas-blazek-GnvurwJsKaY-unsplash.jpg" alt="" class="img-fluid">
<div class="po-absolute">
</div>
</div>
</a>
</div>
Here is the CSS related to these boxes:
.po-relative {
position: relative;
border: .5px solid #cecece;
}
.po-absolute {
background-color: white;
height: 176px;
width: 266px;
position: absolute;
bottom: 0;
transition: 250ms ease-in-out;
}
.po-absolute:hover {
background-color: black;
opacity: 20%;
}
I have also provided an image showcasing the problem https://i.sstatic.net/qwDGM.png