I am trying to combine two centered images in CSS but I'm facing some alignment issues.
display: block;
margin: auto;
This is what it looks like currently:
I want the larger image (currently at the bottom) to be positioned under the smaller image without sacrificing the centered positions. I've experimented with z-index and tried setting positions to relative and absolute, but that just throws off the alignment of the images.
HTML:
<img id="logo" src="Pics/logo1.png" class="animated bounceInUp">
<img id="wall" src="Pics/Ywall1.png">
CSS:
#logo
{
height: 200px;
width: 200px;
display: block;
margin: auto;
padding-top: 15%;
}
#wall
{
height: 500px;
display: block;
margin: auto;
}
I also tried following the suggestion provided here, but encountered further alignment challenges. Adjusting the top and left values proved to be cumbersome and didn't result in perfect centering.
Note: I apologize for not being able to embed images or include more than one link due to my lack of reputation on Stack Overflow.