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

Qr Code Challenge

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

Solution retrospective


Hello , This my first challenge in Frontend Mentor so if you have any advice to improve the code please tell me so i could update it thank you.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Alan•160
    @TheMax370
    Posted over 2 years ago

    Hi Straw congrats on completing the challenge but I think you have a miss understanding with media queries and how responsive design works. So basically I saw your media query and you set min-width to 1440px, we all know that majority of designs in frontendmentor are meant for desktop devices with 1440px but your media query has a wrong approach I recommend you to search how to set 2 breakpoints in a media query and also take a look on how they work.

    Also when making a web design remember to use the developer tools and use the device toolbar and resize your web design and see how it behaves in other devices so you can think of the approach you are going to take for the media queries.

    Marked as helpful
  • Vincent Daniel•410
    @davinceey
    Posted over 2 years ago

    Hello StrawHatCoder. Congratulations on your first project! It looks wonderful on the whole. Just some little tips:

    I tried using the Responsive tool on my Chrome Dev Tools and at width: 1440px, your solution becomes very much magnified that it loses it's form. You might want to look at your media query code @media screen and (min-width: 1440px) and change the min-width to max-width.

    Hope this helps you. Happy Coding!💖

    Marked as helpful
  • Lucas 👾•104,160
    @correlucas
    Posted over 2 years ago

    👾Hi @StrawHatTeamIt, congratulations for your first solution!👋 Welcome to the Frontend Mentor Coding Community!

    Great solution and great start! By what I saw you’re on the right track. I’ve few suggestions to you that you can consider to add to your code:

    The approach you've used to center this card vertically is not the best way, because using margins you don't have much control over the component when it scales. My suggestion is that you do this alignment with flexbox using the body as a reference for the container.

    REMOVE THE MARGINS

    main {
        padding: 1em;
        /* margin-top: 8%; */
        /* margin-left: 40%; */
        width: 300px;
        background-color: white;
    }
    

    The first thing you need to do is to remove the margins used to align it, then apply min-height: 100vh to make the body height size becomes 100% of the screen height, this way you make sure that whatever the situation the child element (the container) align the body with display: flex and align-items: center / justify-items: center.

    body {
        min-height: 100vh;
        margin: 0;
        padding: 0;
        background-color: hsl(212, 45%, 89%);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
    }
    

    ✌️ I hope this helps you and happy coding!

    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 1st-party linked stylesheets, and styles within <style> tags.

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.

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

Oops! 😬

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

Log in with GitHub