Design comparison
SolutionDesign
Solution retrospective
I found it difficult to finding Background SVG file as exactly as the challenge. I'm also unsure of how svgs are included in the bbackground.
Community feedback
- @0xabdulkhaliqPosted over 1 year ago
Hello there 👋. Congratulations on successfully completing the challenge! 🎉
- I have other recommendations regarding your code that I believe will be of great interest to you.
SUGGESTION 💡 :
- "I found it difficult to finding Background SVG file as exactly as the challenge. I'm also unsure of how svgs are included in the background" ? - Actually for this challenge we don't need any svg files, because we just want to apply the
background: #D6E1F0
forbody
element
CSS 🎨:
- Looks like the component has not been centered properly, So let me explain a proper way, How you can easily center the component without using
margin
orpadding
.
- We don't need to use
margin
andpadding
to center the component both horizontally & vertically. Because usingmargin
orpadding
will not dynamical centers our component at all states
- To properly center the component in the page, you should use
Flexbox
orGrid
layout. You can read more about centering in CSS here 📚.
- For this demonstration we use css
Grid
to center the component
body { min-height: 100vh; display: grid; place-items: center; }
- Now remove these styles, after removing you can able to see the changes
.sheet { margin-left: 50px; margin-right: 50px; margin-top: 100px; }
- Now your component has been properly centered
.
I hope you find this helpful 😄 Above all, the solution you submitted is great !
Happy coding!
Marked as helpful2@pravintargaryenPosted over 1 year ago@0xAbdulKhalid Thank You so much. I learnt something new from you today and will implement what you mentioned.
0@davieboy152Posted over 1 year ago@0xAbdulKhalid Hi, your advice also helped me with my solution, would you care to take a look at mine and give me some input?
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