Design comparison
Community feedback
- @kenreibmanPosted over 2 years ago
Looking good! I'm not sure if you saw my other comment in your first version but
- In your CSS, completely get rid of this block of code.
* { max-width: 1440px; max-height: 100vh; font-family: 'Outfit', sans-serif; => (You can keep this here) }
You should never set a max-width and max-height of a universal selector like that.
I made a few simple changes to your code that would fix the centering problem you have. Change your
.body
div to have the lines:.body { display: flex; min-height: 100vh; justify-content: center; align-items: center; position: relative; }
-
In this code I got rid of your fixed height, padding, and max-width that you set.
-
In the future I would pick a different name other than
.body
. Maybe acontainer
/wrapper
and turn it into a<main class="container"></main>
as that would be more semantically correct, but you can worry about that later.
This should look way cleaner now!
1
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord