Why are these centered divs shifted upwards and how to fix this?
I don’t understand why these two divs are shifted upwards. How can I align them neatly to the center of the viewport? margin does not seem to be a suitable method to me. Thank you! body { background: linear-gradient(black 50%, grey 50%); height: 100vh; } div#center-upper-half { position: absolute; top: 50%; left: 50%; transform: translate(-50%,… Read More Why are these centered divs shifted upwards and how to fix this?