Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

QR code

P
Hexerseā€¢ 460

@Hexerse

Desktop design screenshot for the QR code component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


What are you most proud of, and what would you do differently next time?

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

Shoaib Shujaā€¢ 560

@ShoaibShuja

Posted

The image element is not displaying and the only issue is that you forgot a . at the beginning of the img's src and to fix this issues change the image's src to src="./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 helpful

1
Daniel šŸ›øā€¢ 44,230

@danielmrz-dev

Posted

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 helpful

1

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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