-3
Hello I have a problem to align overlay two images. There are two images A and B, and B should be on top of A and both aligned at the bottom of another div that is in the center of the page. I’ll leave you an example so you don’t get confused. [! [Model][1]][1] [1]: https://i.stack.Imgur.com/Kgwq3.png I’ve tried everything, but I can’t align the images at all, my biggest problem is a lot of div inside another, I even tried to swap by table, but the result was the same. The closest I got was the model below, being that in position the only one that left an image superimposed on the other was Absolute, however it is aligned by the page and not by the external div, which is what I need, I even tried to put another div containing just the images just to try to align and I don’t even know if it gets worse or helps.
@charset "utf-8";
div#A{
position:absolute;
width:auto;
}
div#B{
position:relative;
bottom:0px;
vertical-align: middle;
width:auto;
}
div#Tela{
align-items: center;
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
width: 60%;
height:auto;
text-align:center;
}
.Btn{
position:static;
width:100%;
height:auto;
}
.Botao{
width:100%;
text-align: left;
background:#09F;
font-size: 18px;
font-family:"Arial Black", Gadget, sans-serif;
}
<!Doctype HTML>
<html lang = "pt-br">
<meta charset "UTF-8">
<head>
<title>Doc</title>
</head>
<body>
<center>
<div id="Tela">
<div>
<div id="A"><img id="imgA" src=""></div>
<div id="B"><img id="imgB" src=""></div>
</div>
<div class="Btn">
<button type="button" id="btn" onclick="btn()" class="Botao"></button>
</div>
</div>
</center>
</body>
</html>
Thanks for your attention, I’ve been trying to fix this for months, but nothing helps.