Account Deleted
My first suggestion, is to be able to center something on the page is in the body like this,
body {
display: grid;
place-items: center;
min-height: 100svh;
}
My second is to reset padding, margin and set the box-sizing to border-box like this.
* {
box-sizing: border-box;
padding: 0;
margin: 0;
}
As for the media queiries, have your container set to flex, and in the media queiry set it like to flex-col, like this,
.container {
display: flex;
}
@media (max-width: 40rem) {
.container {
flex-direction: column;
}
}
Also setting images, svgs and buttons to display block helps with styling aswell. And as a last note seperate your css from your html like this,
files
>index.html
>style.css
Hope this helps and if you are unsure on anything else, ill be happy to help.
Marked as helpful
@msbarghini
Posted
@Benjihunt97
Thanks so much for the detailed feedback! I'll play around with the code and make the changes.
Just a quick one, for a simple layout like this, why did you suggest Grid over Flexbox? I picked flexbox because it's supposed to be a 1D design. Is there a better way to choose?
Also, why chose rem instead of px for sizing (media queries).
Can't wait to get back to it, thank you!!!