You still have a two-column layout inside the media query. Also because you have explicitly placed the elements on the grid you have to place them again. The easiest code isn’t really the best solution, but I think it is OK to use it for this simple project.
-
Move the media query to the bottom.
-
Set grid-template-columns
to use one column.
-
Reset grid-column
on all the children of the form element.
-
Set justify-self
to start
on all the labels.
Because of specificity issues, we have to use !important
, this should always be used sparingly. There is in 98% of all cases a better solution than using !important
.
@media (max-width: 600px) {
form {
grid-template-columns: 1fr;
}
form > * {
grid-column: initial !important;
}
form > label {
justify-self: start !important;
}
}
You have two typos in the CSS. Press the down arrow to the right of the CSS code box and select “Analyze CSS”. Correct the errors.