Lazy man trying to make a card component (Failed in the attempt)
Design comparison
Community feedback
- @DeanogitPosted 11 months ago
Hi @srjavih3,
Great effort so far with your submission
I noticed a couple of things that you might find interesting.
It is not common practice to declare height and width properties in your CSS file on both the
html
andbody
element selectors, but you're right to declare them on thebody
.You've done a great job using the
*
selector to reset the browser defaults onbox-sizing: border-box
, it's possible to placemargin: 0;
andpadding: 0
in there too instead of being in the body selector.I hope this helps
Above all, well done, great work and keep going
0@javascriptor1Posted 11 months agoSetting height 100% on body tag only without setting same prop on html root tag would not work if you want to have 100vh effect.
Both html and body tag should have 100% height prop in order to have viewport height of 100%.
Other option is to give body tag only100vh instead of 100% - It will work in this case
1
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