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 HTML and CSS

@JessicaRagnar

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


This was quite an easy exercise, but really fun to create something small and pretty! It's good to practice flexbox too.

All feedback is welcome!

Community feedback

P

@Islandstone89

Posted

Hi, good job on the challenge. Here are my suggestions to improve it even further.

HTML:

  • .box-text should be a <footer>.

  • Footer text needs to be wrapped in a <p>.

CSS:

  • Performance-wise, it's better to link fonts in the <head> of the HTML then using @import.

  • It's good practice to include a CSS Reset at the top.

  • on the body, height should be min-height.

  • I would move the margin: 2rem from the body to the .container. The card might need some margin, so it doesn't touch the edge of the screen on smaller sizes. I think 1rem might be enough, though.

  • Remove overflow: hidden.

  • Since all text is centered, you can put text-align: center on the body, and remove it elsewhere. This way, you're taking advantage of inheritance, and you get the same result with one less line of code.

  • Media queries should be in rem, not px. You don't need a media query here, though - the card should look the same on all devices.

  • Add a max-width on the card, (in rem also), to prevent it from getting too big on larger screens. Around 20rem should work fine.

Hope this helps :)

Marked as helpful

0

@Lartzmanuel

Posted

Hey there, Checked out your site and it's pretty cool.. But a few things.. It'd be better to rather target all html elements and reset to allow proper layout control. Code below

* { 
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

Aside that I think every other thing is fine. Hope this helps!

Marked as helpful

0

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