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

utilice HTML y CSS base.

cube-css
Benjamin Mancuello•40
@Mancux2premium
A solution to the QR code component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


I'm not sure how to make the html, do I put too many div? what do you think?

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Ali Nemat•180
    @AliNematt
    Posted almost 3 years ago

    Hi Benjamin, congratulations for your solution!

    I saw your code and I have some recommends for you!

    1. It is customary to use style.css for main stylesheet , So it's better to use style.css instead of index.css.
    2. It's not necessary to use same codes for responsivity! for responsive design just change the variable property . for example: if your width in desktop is same with mobile just skip it! and remember that always style desktop at the first!
    3. about your HTML , containerQr & containerImg & containerParrafos aren't important. for example : HTML :
      <div class="mainContainer">
            <img src="images/image-qr-code.png" alt="Qr">
            <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>
      </div>   
    

    and your CSS :

        body {
            background-color:var(--Lightgray);
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            font-size: 10px;
            font-weight: 700;
            font-family:'Outfit', sans-serif;
            text-align: center;
            color: var(--Darkblue);
        }
        .mainContainer{
            background-color: var(--White);
            border-radius: 12px;
            display: flex;
            align-items: center;
            flex-direction: column;
            width: 300px;
            height: 480px;
        }
    

    Hope it helps you! Wish you the best.

    Marked as helpful
  • Ismail•230
    @itbeginswithi
    Posted almost 3 years ago

    Congrats on your first project on frontend mentor, Benjamin.

    The html seems good to me, the css on the other hand is not.

    @media queries are meant to add changes for different viewports, they don't interfere with the browser's access to the lines above or below it, that's why you don't need to include the whole styling of your website within every media query (:root variables can stay outside, on the top of your css file, unless they are meant to add changes for smaller or larger screens).

    To learn more about stlying responsive websites, I suggest you start with the following youtube video: https://www.youtube.com/watch?v=VQraviuwbzU

    Good luck!

    Marked as helpful
  • Orlando Guevara•220
    @coding-tomato
    Posted almost 3 years ago

    I think the HTML is fine! Good work.

    Seems like the font-weight for the description is off. Other than that it looks good!

    If you wished to work further on it, you could add some responsiveness by making the width of the card have a max-width and a min-width, and have the width be 100%, so it stretched a bit depending of the phone's screen width.

    {
        min-width: 200px;
        width: 100%;
        max-width: 300px;
    }
    

    A similar approach would be to instead use clamp, to clamp the width between a set of values:

    {
        width: clamp(200px, 100%, 300px);
    }
    

    To make these changes effective you'd need to make some adjustments on the padding of the card, among other things.

    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, SASS, 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

Oops! 😬

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

Log in with GitHub