Design comparison
SolutionDesign
Community feedback
- @NehalSahu8055Posted about 1 year ago
Hello Coder 👋.
Congratulations on successfully completing the challenge! 🎉
Few suggestions regarding design.
-
Never use stylings on
html
styling starts frombody
. -
To properly center the card
-
USING FLEXBOX
body{ display: flex; flex-direction: column; (as there are 2 elements main and footer) justify-content: center; align-items: center; min-height: 100vh; }
- For non-decorative images give meaningful and descriptive alt like
alt= "QR code to frontend mentor website"
.
I hope you find this helpful.
Happy coding😄
1@Tomomi-K1Posted about 1 year agoHi @NehalSahu8055 Thank you so much for taking your time to look over my solution. I have implemented your suggestions. I have a quick question. Why would we use min-height: 100vh instead of just height:100vh?
1@NehalSahu8055Posted about 1 year ago- Setting the height: 100vh may result in the component being cut off on smaller screens, such as mobile devices in landscape orientation.
- For example; if we set height: 100vh then the div will have 100vh height no matter what. Even if the content spans more than 100vh of viewport.
- But if we set min-height: 100vh then the div will start at 100vh, if the content pushes the div beyond 100vh it will continue growing.
- However if you have content that takes less than 100vh it will still take 100vh in space.
Marked as helpful0@Tomomi-K1Posted about 1 year ago@NehalSahu8055 Thank you so much for the helpful information!🙌🏻
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