Design comparison
Solution retrospective
-
How could I make may CSS DRY? I've repeated the same margins several times.
-
Couldn't get the background right, any tips/solutions?
Community feedback
- @visualdennissPosted over 1 year ago
Hey there,
congrats on completing the challenge successfully! Your submission looks pretty nice overall.
It looks like your background color is missing on the desktop view. You can just add this: background-color: #e0e8ff; to the body to solve and match the design. But if it is your preference to keep it white, you can also try adding a box-shadow e.g. box-shadow: rgb(149 157 165 / 20%) 0px 8px 24px; to the .card for an interesting look. Here is a great resource of some cool box-shadows, i also use a lot: https://getcssscan.com/css-box-shadow-examples
Hope you find this feedback helpful!
Marked as helpful1 - @markuslewinPosted over 1 year ago
Try using padding, instead of margin, for space between a container and its content!
0 - @atif-devPosted over 1 year ago
Hi Barry, congrats🎉 on completing the challenge.
- Learn The var() Function from here to tackle DRY in your css.
- For background modify
body
selector code as:
body{ margin: 0; padding: 0; text-align: center; background: url("../images/pattern-background-desktop.svg") no-repeat top center; background-color: hsl(225, 100%, 94%); display: grid; min-height: 100vh; place-content: center; }
After applying above block of code also remove following code:
@media(max-width: 700px) { body { background:hsl(225, 100%, 94%); } }
Hope you will find this Feedback Helpful.
0
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