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

QR-code-component ussing css and html

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

Solution retrospective


Completed my first Frontend Mentor challenge.I'm having trouble adapting my website to different screen sizes like mobile devices. It currently looks great only on my laptop. Any advice or recommendations for free courses to help me learn how to make it responsive?

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • P
    Atif Iqbal•3,320
    @atif-dev
    Posted almost 2 years ago

    Hi, congrats on completing the challenge. Better take care about following points:

    • A simple way to center the container is using flex or grid. For better look modify .container as:
    .container {
    background-color: hsl(0, 0%, 100%);
    margin-bottom: 8%;
    width: 225px;
    height: 325px;
    border-radius: 10px;
    padding-top: 11px;
    }
    

    and use following code as:

    body {
    display: grid;
    place-content: center;
    min-height: 100vh;
    }
    
    • You must be seeing some accessibility issues after submission the project. To avoid such issues use semantic tags and apply following structure:
    <body>
    <main>
    ---your code here----
    </main>
    <footer>
    </footer>
    </body>
    
    • It is preferred to use responsive units.(rem for font-size and em for margin and padding).
    • Write more in README file of Github project. Like write about your working flow, findings, newly learned things, useful resources, etc.
    • Since you are not familiar with responsiveness as you said in comment to have issues for different screen sizes...so in that case I will suggest you this free intro course for responsiveness. Link of course

    Hope you will find this Feedback Helpful.

    Marked as helpful
  • P
    Justin Green•2,960
    @jgreen721
    Posted almost 2 years ago

    Nice work, and congrats on finishing your first challenge! I see you used % as your width units which, you may want to be careful with since that will respond to the relativity of your devices screen width and so can shrink/grow to undesired sizes. There are a bunch of ways to change it but one way could be to just set a min-width:#px in there. rem and em units also available (and are generally preferred over pixels as again, they handle screen-resizing a bit better). All these things have plenty of information on them so not a big deal to digest all that, main suggestion would in just be setting the min-width. Again, nice work and congrats! 😎

    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