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

Display QR Code

3p0na 20

@3p0na

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


Hi all,

would it make sense to use sub-divs (one for the qrcode, one for the text...) or would you say, one div for the whole container is enough - like in my solution? I thought using more than the one div could maybe make the code unnecessarily complicated.

Thanks for feedback.

Community feedback

d8701a 240

@d8701a

Posted

Hello there! Congrats on having completed this challenge, awesome work!

To answer your question, yes, definitely you could use sub-divs. I saw many developers use them.

So your whole card could have been wrapped in a .box_wrapper div. Then inside, you could've created .image_wrapper and .content_wrapper. Inside the .image_wrapper would be the QR code image, and within the .content_wrapper you could have put the h2 and p elements with their content. As a matter of fact, this is how I did the challenge.

To summarize, everything would be contained in a .box_wrapper, which would be the parent container, and you could set it to display: flex, set its width etc.

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