I'm attempting to align a div in the center while maintaining the position of its contents.
Check out my code snippet:
<style>
.wrap{
position: relative;
}
.character{
position: absolute;
bottom: -10%;
left: 0;
height: 100px;
}
</style>
<div class="wrap">
<img class="background" src="https://p4.wallpaperbetter.com/wallpaper/348/300/844/digital-digital-art-artwork-planet-fantasy-art-hd-wallpaper-preview.jpg">
<img class="character" src="https://lh3.googleusercontent.com/KWjPQjV1ZZXvMBFNjab-HK3ZHTO5zSpkPTFf3x-d87RNBMnZ3A2hCbTZNumHxfydGQ">
</div>
Here's the outcome I'm currently seeing https://i.sstatic.net/Dr5xF.png
And this is the desired result that I'm aiming for https://i.sstatic.net/PSDHR.png