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 component using Flexbox

P

@rkeppler42

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?

I am proud of being able to get close in the first iteration. Next time I will be more prepared because I will study more flexbox.

What challenges did you encounter, and how did you overcome them?

I am new in webdesign so flexbox is quite hard to me yet. I had to google somethings

What specific areas of your project would you like help with?

I would like to know if there is something or some technic I could have used to make my page more robust and complete.

Community feedback

Huy Phan 1,360

@huyphan2210

Posted

Hi @rkeppler42,

It looks like this is your first challenge, and you got the QR card 99% accurate to the design—congratulations!

I do have a few suggestions:

  • You don’t need to add width: 100vw to the body because the body is already a block-level element, which naturally takes up the full width. Also, instead of setting height: 100vh, it’s better to use min-height: 100vh to avoid layout issues on smaller viewports (e.g., mobile browsers with dynamic address bars).
  • Consider using more semantic HTML instead of relying heavily on div elements. Semantic elements like article, section, or main provide better context for the content, improving accessibility.
  • While I don’t have access to the design file, your card looks nearly perfect. Keep in mind that the design may be optimized for specific devices, so it’s often the developer's job to make elements responsive. Rather than hardcoding width and height values, try using min-width/min-height or max-width/max-height with specific values, while keeping width/height relative (e.g., using percentages or vw/vh units).

Hardcoded Width/Height (Not Recommended)

.card {
  width: 320px;
  height: 499px;
}

Responsive Example (Recommended)

.card {
  max-width: 320px;
  width: 90%; /* Relative width, adjusts based on the screen size */
  
  min-height: 499px;
}

Hope this helps!

Marked as helpful

1

P

@rkeppler42

Posted

@huyphan2210 thanks for your feedback! I really have to study responsiveness! I'm gonna take a deep dive!

0

@Hana094

Posted

it looks good, the only thing I wouls consider is looking at how you are making your comits, because your repo has a lot of wierd files that I think may not be of use, but I can deny that You got the desire result

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