Trying to center the DIV .dollar and .euro is proving to be quite a challenge, regardless of what I attempt. Below is all the HTML and CSS that I have been working with. Your assistance in resolving this issue would be greatly appreciated.
.App {
text-align: center;
}
@media (prefers-reduced-motion: no-preference) {
.App-logo {
animation: App-logo-spin infinite 20s linear;
}
}
.App-header {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}
.texto{
place-self: flex-end;
margin: 0px 20px 13px 20px;
}
.Real_Rapido{
margin: auto;
width: 900px;
}
.dolar{
padding-top: 20%;
}
.dolar, .euro{
display: flex;
vertical-align: bottom;
}
.euro{
padding-top: 10%;
}
.cotacao{
display: flex;
}
.cotacao, .simbolo{
font-size: 2em;
}
.cotacao input{
font-size: 2em;
border: none;
outline: none;
text-align: right;
}
.moeda{
width: 150px;
color: #778899;
}
.bandeiras{
position: absolute;
padding-left: 100px;
height: 68px;
margin-top:-20px;
}
.simbolo{
position: relative;
color: #D3D3D3;
width: 118px;
text-align: right;
}
.eua{
background: transparent url(eua.png) no-repeat center;
background-size: 100px;
}
.br{
background: transparent url(brasil.png) no-repeat center;
background-size: 100px;
}
.ue{
background: transparent url(ue.png) no-repeat center;
background-size: 100px;
}
<html lang="en">
<head>
<link rel="stylesheet" href="stylee.css">
</head>
<body>
<div id="root">
<div class="Real_Rapido">
<div class="dolar">
<span class="cotacao">
<span class="bandeiras eua"></span>
<span class="simbolo">US$</span>
<input type="text" class="moeda" value="1.00">
</span>
<span class="texto">está valendo</span>
<span class="cotacao direita">
<span class="bandeiras br"> </span>
<span class="simbolo"> R$ </span>
<input type="text" class="moeda" value="5.06">
</span>
</div>
<div class="euro">
<span class="cotacao">
<span class="bandeiras ue"> </span>
<span class="simbolo"> € </span>
<input type="text" class="moeda" value="1.00">
</span>
<span class="texto">está valendo</span>
<span class="cotacao direita">
<span class="bandeiras br"> </span>
<span class="simbolo"> R$ </span>
<input type="text" class="moeda" value="5.50">
</span>
</div>
</div>
</div>
</body>
</html>
The use of 'flex' seems to be causing some issues in achieving centralization, but removing it breaks everything apart. If you have any insights or solutions, I would greatly appreciate an explanation along with the fix. Thank you for your help!