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

Creating components using CSS

@JOAN-96

Desktop design screenshot for the QR code component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

@Micahtron

Posted

Great work, however it looks like you're using id attributes for the styling (id="weight-700"). This is better done using classes since you could have multiple elements on a page with that same styling class such as cards, headings, teasers, etc. The id attribute names are meant to be unique and used only once per page.

Since this is a single component by itself it doesn't matter too much, but if multiple QR cards of this type were used in a full page this would need to be changed to classes. Plus using classes for your styling system attributes makes them useable on any element so it wouldn't be limited to just this card type.

Marked as helpful

0

@JOAN-96

Posted

@Micahtron Thanks for the awesome comment. My reason for using id attribute instead of class was because I wasn't using the card styles in multiple places. Thanks for the observation and advise, I would put in mind when doing the next challenge.

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