I'm struggling to position an image within a div in a way where:
- it protrudes above the div
- it begins at the very bottom of the div (with a small gap that I can't eliminate)
Below is the relevant HTML code snippet:
<div class="teaser-image-wrapper">
<div class="wrap">
<img class="image2 more-height" src="images/svg/creativeyou.svg" alt="Creative You! Title Image">
</div>
</div>
And here is my CSS:
.teaser-image-wrapper {
background-color: #83ffcd;
width: 100% !important;
margin:
}
.wrap {
width: 80%;
}
.teaser-image-wrapper img {
padding: 0 !important;
object-fit: contain;
max-height: 75vh;
max-width: 100%;
line-height: 0;
}
For reference, the greenish background of the wrapper (.teaser-image-wrapper) should be positioned lower than the image (svg) so that it sticks out at the top. Additionally, please note the small gap at the bottom.
https://i.stack.imgur.com/jzz0l.png
Any assistance or guidance on this matter would be greatly appreciated. Thank you!