Design comparison
Solution retrospective
This challenge was really cool because I managed to do it quickly, it's my first challenge where the site is really responsive. I really liked my result!
Community feedback
- @NehalSahu8055Posted over 1 year ago
Hello Coder 👋.
Congratulations on successfully completing the challenge! 🎉
Few suggestions regarding design.
➨ Use
Semantics
for the proper design of your code.<body> <header> <nav>...</nav> </header> <main>...</main> <footer>...</footer> </body>
you can wrap up .attribution div to footer.
or alternatively
<body> <div class="container" role="main"> /html code goes here: 📃 </div> </body>
➨ Replace
height
withmin-height:100vh
in the body to properly center the card.➨ Use
max-width
instead ofwidth
to make your card responsive.➨ Remove width:100vw.
- Setting an element's
width to 100vw
makes it as wide as the current viewport. But doing that is bad practice. First, it is almost always unnecessary. A block element, by default, already takes up all the available width. Setting the width manually is not needed in that situation.
I hope you find this helpful.
Happy coding😄
Marked as helpful0 - Setting an element's
- @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.
MEASUREMENTS 📐:
- The
width: 100%
property fromhtml
&body
is not necessary. because they are block level element which will take the full width of the page by default.
- So feel free to remove that style rule, this will help you to write efficient code and makes your code more reusable.
.
I hope you find this helpful 😄 Above all, the solution you submitted is great !
Happy coding!
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