@NehalSahu8055
Posted
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😄
@Tomomi-K1
Posted
Hi @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?
@NehalSahu8055
Posted
- 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 helpful
@Tomomi-K1
Posted
@NehalSahu8055 Thank you so much for the helpful information!🙌🏻