Design comparison
Community feedback
- @correlucasPosted about 2 years ago
👾Hello Jody, congratulations for your first solution!👋 Welcome to the Frontend Mentor Coding Community!
Great solution and great start! By what I saw you’re on the right track. I’ve few suggestions to you that you can consider to add to your code:
1.The favicon is placed correctly, no problem there.
2.The image is not displaying due an error to indicate the correct path for the image
<img src="./images/image-qr-code.png" class="image" alt="QR Code">
- When you’re use the folder locally with a live silver there’s no need to indicate the folder because the system is able to find it alone, but in a live repository/site you ever need to indicate the exact folder path to have the image loaded. To indicate the folder path you can use dot slash
./
and if is inside a subfolder use dot dot slash../
If the image is the same folder of the html without folder just add normal path.
3.The approach you've used to center this card vertically is not the best way, because using margins you don't have much control over the component when it scales. My suggestion is that you do this alignment with
flexbox
using the body as a reference for the container.The first thing you need to do is to remove the margins used to align it, then apply
min-height: 100vh
to the body to make the child (the card/container) align to its size that now will be displaying 100% of the viewport height and then give its alignment withdisplay: flex
andalign-items: center
/justify-items: center
.body { min-height: 100vh; font-family: 'Outfit', sans-serif; display: flex; justify-content: center; align-items: center; background: hsl(212, 45%, 89%); text-align: center; /* margin: 80px; */ }
✌️ I hope this helps you and happy coding!
Marked as helpful1 - When you’re use the folder locally with a live silver there’s no need to indicate the folder because the system is able to find it alone, but in a live repository/site you ever need to indicate the exact folder path to have the image loaded. To indicate the folder path you can use dot slash
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