I would like to have the player and computer tags vertically aligned down the middle with one another but when I make the position absolute and try to move them, they end up being off kilter with one another. I noticed that when I have both at top: 50% and left: 50% they're positioned how I'd like them to be but when I move them they lose their middle-vertical positioning.
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Roboto", sans-serif;
}
body {
background: #11151c;
}
.comp-name,
.player-name {
color: white;
font-size: 24px;
text-align: center;
border: crimson 3px solid;
}
.comp-name {
position: absolute;
top: 2%;
left: 50%;
transform: translate(-50%, -50%);
}
.player-name {
position: absolute;
top: 98%;
left: 50%;
transform: translate(-50%, -50%);
}