Design comparison
SolutionDesign
Solution retrospective
I'm unsure of which is the body or div container properties. Is it the body that is light grey or there is a div container with that color? Are the width properties for the container or the body? What's the best way to add a media query with the desktop width? Lastly, my image and favicon isn't showing on the live site even though the path is the correct one
Community feedback
- @SatellitePeacePosted about 2 years ago
Hello @OgunremiZainab congrats on completing this challenge
-
to answer your questions
-
the light grey color is meant to cover the entire screen which means the light grey should be placed on the body element
body{ background-color: lightgray; }
- The width property determines how wide the content of your project will be so the width property should be set to the container element and not the body
main{ max-width: 375px; width: 100% } ```` - I recommend that you use mobile-first approach in most cases or all the time if possible. mobile-first approach simply means designing the layout for the phone first and using media queries to change certain styles to suit bigger screens like tablets and desktops - If you are using mobile-first approach, your media query will look like this ```` @ media screen and (min-width: 768px){ main{ max-width:700px; width: 100% } } ```` - then if you are using a desktop-first approach your media query will have a max-width like so ```` @ media screen and (max-width: 375px){ main{ max-width:300px; width: 100% } }
- On the small screen your card looks great but on the large screen it does not, try setting the main container enclosing your contents to a max-width of 375px and a width of 100%, and also add a margin of 3rem to your body like so
body{ margin: 3rem; } mainContentContainer{ max-width: 375px; width: 100%; }
I hope this helps
Marked as helpful0 -
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