Design comparison
Solution retrospective
Getting the qr code to the middle of the screen. Next time I know how to use flexbox to tackle this.
What challenges did you encounter, and how did you overcome them?Getting the qr code to the middle of the screen. Using and understanding how flex allows for the movement of divs in the x and y axis.
What specific areas of your project would you like help with?Nil
Community feedback
- @ShoaibShujaPosted 5 months ago
The image element is not displaying and the only issue is that you forgot a
.
at the beginning of the img'ssrc
and to fix this issues change the image'ssrc
tosrc="./images/image-qr-code.png"
.And also to center your
.container
perfectly inside the body element copy these lines of code to you CSS file:body { width: 100%; min-width: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; }
Marked as helpful1 - @danielmrz-devPosted 5 months ago
Hello there!
Congrats on completing the challenge! ā
Your solution looks great!
I have one suggestion:
- When using the tag
<img>
, make sure to set the correct path, otherwise your code won't be able to find the image. And if your code can't find it, it won't show.
š This is your code:
<img src="/images/image-qr-code.png" alt="Image of QR code">
š And here's the update with the correct path:
<img src="./images/image-qr-code.png" alt="Image of QR code">
The difference is just a dot but it's enough to prevent your image from showing.
I hope it helps!
Other than that, great job!
Marked as helpful1 - When using the tag
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