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

qr-code-challenge

FanisFFF•230
@FanisFFF
A solution to the QR code component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)
Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Miguel Angel•270
    @77iu
    Posted over 1 year ago

    Hello, I'm Miguel

    So that main or any other element is centered, I suggest the following:

    body{ max-width:1440px; height:100vh; display:flex; align-items:center; justify-content:center; }

    Tell me if this information was useful to you 😃.

    If you like animated buttons I invite you to visit [https://youtube.com/@77iu-CSS?si=sbpP_EDa8PN6Zvak]

    Greetings from Argentina!!👋👋👋

    Marked as helpful
  • Pranjali Sargar•520
    @Psargar616
    Posted over 1 year ago

    Hey @FanisFFF! Great Work on the QR Code Component Challenge! 🌟

    I just had a look at your solution for the "QR Code Component" challenge, and I wanted to commend you on your outstanding work! Your code structure is incredibly clean, and your design is impressively responsive. I can see the effort you've put into it, and it really shows!

    I have a suggestion that might enhance your project even more:

    • Flex/Grid Centering: Using flexbox or grid layout can help you effortlessly center your QR code card. It's a neat trick to ensure your design looks flawless on all screen sizes.

    • Viewport-Centered Container: Make your container class take up the entire viewport's height and width. This, combined with flex or grid, will help you center the QR card effectively.

    • One quick suggestion I have is to consider placing the QR code image inside an <img> tag within a <div>. It can offer more control over the QR code's display properties and make it even more adaptable to different screen sizes.

    You can try following code tweak's to get near to the original design:

    body {
        background-color: hsl(212, 45%, 89%);
        font-family: "Outfit", sans-serif;
        font-size: 15px; 
        width: 100vw;
        height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .card {
        /* display: inline-block; */
        background-color: white;
    // remove margins and add uniform padding for the card
        /* margin-left: auto; */
        /* margin-right: auto; */
        /* margin-top: 4%; */
        /* margin-bottom: 25%; */
        border-radius: 1rem;
        text-align: center;
        width: 300px;
        height: fit-content;
        padding: 10px;
        display: flex;
        flex-direction: column;
    
    
    }
    

    Your work is already impressive, and these suggestions are just meant to help you explore different techniques. Keep up the excellent work! If you ever need more tips or have questions, don't hesitate to ask. If you found this feedback useful, please mark this comment as helpful

    Keep up the great work, 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 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