Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 2 years ago

QR Code Component with HTML CSS and FLEXBOX

sass/scss
Adnan Haydir•70
@adnanhaydir
A solution to the QR code component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Hi, i'm Adnan Haydir. I'm Junior Web Developer. Currently learning about HTML, CSS and Javascript. Any feedback accepted! Thankyou! Cheers

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Kyrylo Haiduk•420
    @superpooperxxx
    Posted over 2 years ago

    Hi, good job on making this project🔥

    • You are using <section> incorrectly. <Section> is some huge part of website, for instance "Testimonials", "Contacts", "About us" and so on. In this project you actually have only one section which is this hole project.
    <section class="qr-image">❌
      <img src="images/image-qr-code.png" alt="" />
    </section>
    <section class="text">❌
      <h1>Improve your front-end skills by building projects</h1>
      <p>
         Scan the QR code to visit Frontend Mentor and take your coding
         skills to the next level
      </p>
    </section>
    
    ✅
    <section class="container"
     ...
    </section>
    
    • Always give alt description to image elements. Those are crucial, as they replace the image if it is broken or cannot load with text in alt.
    ✅
    <img
      src="images/image-qr-code.png"
      alt="QR code to move to frontend mentor website"
    />
    

    Happy coding❤️ Hope this was helpful

    Marked as helpful
  • Hassia Issah•50,390
    @Hassiai
    Posted over 2 years ago

    Replace<div class="container">with the main tag and <div class="attribution"> with the footer tag to fix the accessibility issues. click here for more on web-accessibility and semantic html

    To center .container-box on the page, replace the height in .container with min-height:100vh.

    There is no need to give .container-box a height value, replace that with a padding value for all the sides. padding: 15px. there is no need to style .qr-image, give the img a max-width of 100%.

    Add a font-size of 0.9375rem which is 15px to .text this will be the font value for both h1 and p, There is no need to give h1 and p font-weight values.

    Use relative units like rem or em as unit for the padding, margin and width values, instead of using px which is an absolute unit. For more on CSS units Click here

    Hope am helpful.

    Well done for completing this challenge. HAPPY CODING

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

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