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 basic css

@Chiwetalu345

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


please would you highlight what section of my code is subpar according to industry standards?

Community feedback

Ozmar Mendozaโ€ข 240

@ozzy1136

Posted

Your code looks great!

One change I would make is to place the <img/> inside the <article/>, because the image is related to the other content inside the <article/>.

The only other change I would make is to move all the CSS styles that affect the card from the <section/> to the <article/> element (e.g. width, background-color, padding, border-radius). This will make it easier to reuse the code if you wanted to add another card on the page.

Marked as helpful

0

@Chiwetalu345

Posted

@ozzy1136 Thank you soo much for the feedback. i really appreciate it.

1
Lucas ๐Ÿ‘พโ€ข 104,440

@correlucas

Posted

๐Ÿ‘พHi @Chiwetalu345, congratulations on your solution!๐Ÿ‘‹ Welcome to the Frontend Mentor Coding Community!

Great solution and a great start! From what I saw youโ€™re on the right track. Iโ€™ve few suggestions for you that you can consider adding to your code:

  • Something that can be a time saver for you is to use a CSS RESET to remove all default settings for margins, making the images easier to work, see the article below where you can copy and paste this CSS code cheatsheet: https://piccalil.li/blog/a-modern-css-reset/
  • Replace the <h2> containing the main title with <h1> note that this title is the main heading for this page and every page needs one h1 to show which is the most important heading. Use the sequence h1 h2 h3 h4 h5 to show the hierarchy of your titles in the level of importance, never jump a level.
  • Add a margin of around margin: 20px to avoid the card touching the screen edges while it scales down.
  • Use relative units as rem or em instead of px to improve your performance by resizing fonts between different screens and devices. These units are better to make your website more accessible. REM does not just apply to font size, but to all sizes as well.

Here's my solution for this challenge if you wants to see how I build it: https://www.frontendmentor.io/solutions/qr-code-component-vanilla-cs-js-darklight-mode-nS2aOYYsJR

โœŒ๏ธ I hope this helps you and happy coding!

Marked as helpful

0

@Chiwetalu345

Posted

@correlucas Thank you so much for the feedback. I really appreciate that you took some time to go through my code. I will rework my code with your corrections. I hope to get more feedback from you on my future challenges

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