Design comparison
Solution retrospective
Not sure if the background works, but I thought it needed something!
Community feedback
- @AdrianoEscarabotePosted about 2 years ago
Hi Jeremy, how are you? Welcome to the front-end mentor community! I really liked the result of your project, but I have some tips that I think you will enjoy:
A good practice to center content is using
grid
orflex-box
, avoid using margin or padding to make placements, use only in the latter case! we can do it like this:Flex-box:
body { display: flex; align-items: center; justify-content: center; flex-direction: column; min height: 100vh; }
GRID
body { display: grid; min height: 100vh; place-content: center; }
The rest is great!
I hope it helps... π
Marked as helpful0 - @VCaramesPosted about 2 years ago
Hey there! π Here are some suggestions to help improve your code:
- To properly center your content to your page, you will want to add the following to your
body
element (this method uses CSS Grid):
body { min-height: 100vh; display: grid; place-content: center; }
More Info:π
[Centering in CSS][https://moderncss.dev/complete-guide-to-centering-in-css/]
- The β30-day, hassle-free money back guaranteeβ is not a heading. It should instead be wrapped in a
paragraph
element.
- The button was created with the incorrect element. When users click on the button they should directed to a different part of your site; the
anchor
element will allow this to happen.
- The βWhy Usβ list needs to be created using an
unordered list
element along with thelist item
element.
- Your CSS Reset is extremely bare and being underutilized. To fully maximize your CSS reset, you want to add more to it.
Here are few CSS Resets that you can look at and use to create your own or just copy and paste one that is already prebuilt.
https://www.joshwcomeau.com/css/custom-css-reset/
https://meyerweb.com/eric/tools/css/reset/
http://html5doctor.com/html-5-reset-stylesheet/
If you have any questions or need further clarification, feel free to reach out to me.
Happy Coding! ππ¦
Marked as helpful0 - To properly center your content to your page, you will want to add the following to your
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