Fix quiz page vertical centering regression

The CSS cleanup broke vertical centering: flex on body causes main to
stretch full-width; place-items:center on a grid body only centers
items within their auto-sized track (not the track within body).

Fix: move background/color to html (full-viewport grid that centers
body), give body height:100% + display:grid + align-content:center
(centers the content track within full-height body) + justify-self:center
(shrink-wraps body width). Matches production behavior exactly.
This commit is contained in:
2026-07-01 21:32:16 +02:00
parent d94eeced8c
commit e5198507ae
+13 -7
View File
@@ -1,17 +1,23 @@
html {
height: 100%;
}
body {
min-height: 100%;
background-image: url("../img/background.png");
background-position: center;
background-repeat: no-repeat;
background-color: black;
color: white;
display: flex;
flex-direction: column;
justify-content: center;
display: grid;
align-items: center;
}
body {
height: 100%;
background-image: url("../img/background.png");
background-position: center;
background-repeat: no-repeat;
background-color: black;
display: grid;
align-content: center;
justify-self: center;
}
.elimination-screen {