Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 1 year ago

QR Code box using CSS and HTML

nicoleesposito•10
@nicoleesposito
A solution to the QR code component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

I'm proud of how it came to be like the image that was given to follow and that everything came to be functional. Next time I would like to organize my CSS a bit differently.

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

Being new to coding, I didn't know how to outsource a font. It was easier than I thought it would be and I found the answer with a quick search. It was also challenging to stack the text and the image but I was able to fix it with flex-wrap.

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

I'm still not sure if I am using div classes correctly, it's been a bit tricky for me to grasp fully so I would like to know if I did something that wasn't necessary. I'm also unsure of whether I placed the Google Fonts code in the right area of my HTML or if it was supposed to be organized differently.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Koda👹•3,830
    @kodan96
    Posted about 1 year ago

    hi there! ✌️

    • For better class names you can look up BEM notation, it's one of the most popular naming conventions in webdev.

    • <div> -s mostly used for separating elements based on the desired layout. Giving them class names like Text is not the best idea, try to make it more specific, like card-text

    Hope this was helpful 🙏

    Good luck and happy coding! 💪

    Marked as helpful
  • Olga•190
    @cvtqx
    Posted about 1 year ago

    Great work! It looks very close to the original design.

    As far as naming classes, the convention is to use all lower case (so no need to capitalize or using all caps with classes). Here is a good article I found that helps to understand the principle: https://www.freecodecamp.org/news/css-naming-conventions-that-will-save-you-hours-of-debugging-35cea737d849/

    Marked as helpful

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
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit all CSS, SCSS and Less files in your repository.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

How does the JavaScript validation report work?

When a solution is submitted, we use eslint to run an automated check on the JavaScript code.

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub