Having a bit of trouble with my code here. I've noticed that when I hover over the div, it cuts off part of my image and removes the padding from the top. Any ideas on how to move the div up when hovering without cutting off the image?
.move {
transition: all 0.4s ease-in;
}
.hover:hover .move {
margin-top: -50px;
}
.hover:hover {
background: black;
}
.readmore {
opacity: 0;
visibility: hidden;
transition: all 0.4s ease-out;
}
.hover:hover .readmore {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
<div class="container mt-5 pt-5 ">
<div class="row d-flex justify-content-center text-center ">
<div class="col-md-3 hover p-0">
<div class="position-relative move d-flex align-items-end p-1 ">
<div class="position-absolute pb-3">
<h1 class="headersize">asd</h1>
<p class="small-text">
Small text
</p>
</div>
<img src="https://encrypted-tbn0.gstatic.com/images?
q=tbn:ANd9GcQzp0rXN9BsNzMPYmzdT6xWc931So2I5sA4YiBX4Nm0rT6MiPBS" class="
mb-4" />
</div>
<div class=" mb-3">
<button type="button" class="readmore p-2 m-2 ">
Read More
</button>
</div>
</div>
</div>
</div>