Design comparison
SolutionDesign
Community feedback
- @Ritika-Agrawal811Posted 11 months ago
Hey, good job on the challenge
I saw your code and would like to point out that you don't have to repeat all the properties for an element inside a media query.
For example, I noticed that for the body tag you have below properties outside the query:
body { background: hsl(30, 38%, 92%); padding: 30px 0; margin: 1rem; }
and then inside the media query you have these :
body { background: hsl(30, 38%, 92%); padding: 60px 0; margin: 1rem; display: flex; justify-content: center; align-items: center; }
because you are not changing margin and background color, you can remove those properties from inside the media query. Those rules will be applied automatically for all screens. This is will help greatly reduce your CSS code!
Hope this comment was helpful!, Happy coding! 🙂
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