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

QR Code Component

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

Solution retrospective


How do I make it so that this website looks good on both mobile and pc?

Should I be using px as a measurement?

How can I make my html and/or css less "messy"

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Fransuelton•230
    @Fransuelton
    Posted almost 2 years ago

    Hello, congratulations on completing the challenge! 🥳✨

    Answering your questions:

    1.To make the content suitable for both devices, simply center it on the page. This challenge does not require the application of responsiveness.

    2.Yes, that's fine. I believe it's a personal matter and preferred. I, for example, use the unit of measure "rem" in my projects.

    3.Looking at your code, in my opinion, in HTML, you could put the sentences inside the div with the container class and use the paragraph tag <p> for each of them. In CSS, to centralize, you can use the properties left: 50%, top: 50% and transform: translate(-50%, -50%). In addition, you can replace the property "position: relative" with position: absolute. You can also remove the properties "align-items: center" and "margin-left: 800px; margin-top: 200px;", as they are no longer needed to center the element.

    📚I recommend studying about flexbox, a very important concept that will greatly facilitate stylization in CSS. Mozilla Basic concepts of flexbox

    In the end, you completed the challenge and did a good job. Keep it up and don't lose focus!😁💪

    If you get confused or have any questions, just ask! Hope this helps. Good luck! 🚀💻

    Marked as helpful
  • IlyasSoe•120
    @IlyasSoe
    Posted almost 2 years ago

    Hello ! nice work !

    use in body the flexbox property or grid to center will align the card in the center (in both axis) instead of the margins in .container.

    e.g :

    body {
    min-height: 100vh;
    }
    .container {
    display : flex;
    align-items: center;
    justify-content: center;
    }
    
    

    for more details : Click me

    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