Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Request path contains unescaped characters
Request path contains unescaped characters
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Qr-code

onna4β€’ 150

@onna4

Desktop design screenshot for the QR code component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

@MelvinAguilar

Posted

Hello there πŸ‘‹. Good job on completing the challenge !

I have some suggestions about your code that might interest you.

HTML 🏷️:

  • Use semantic elements such as <main> and <footer> to improve accessibility and organization of your page.
  • The <br> tag is often used to create line breaks, but it doesn't convey any semantic meaning. When a screen-reader reads the text, it will break the flow of reading at the line break tag, which can be confusing for users. More information here.

Alt text πŸ“·:

  • The alt attribute should not contain underscores or hyphens, it must be human readable and understandable.
  • The alt attribute should explain the purpose of the image. Uppon scanning the QR code, the user will be redirected to the frontendmentor.io website, so a better alt attribute would be QR code to frontendmentor.io

    If you want to learn more about the alt attribute, you can read this article. πŸ“˜.

CSS 🎨:

  • You should use the box-sizing: border-box property to make the width and height properties include the padding and border of the element. This will make it easier to calculate the size of an element. You can read more about this here πŸ“˜.
.first {
    background-color: var(--Light-gray);
    /* width: 90%; */
    /* height: 90vh; */
    /* margin: 5% auto; */
    /* position: relative; */
    /* NOTE: Using grid layout to center the component */
    min-height: 100vh;
    display: grid;
    place-content: center;
}
  • Setting the width of the component with a percentage or a viewport unit will behave strangely on mobile devices or large screens. You should use a max-width of 320px or 20rem to make sure that the component will have a maximum width of 320px on any device, also remove the width property with a percentage value.
.second {
    background-color: var(--White);
    max-width: 320px;
    padding: 13px;
    /* width: 30%; */
    /* height: 50%; */
    /* position: absolute; */
    /* top: 10%; */
    /* left: 35%; */
    color: var(--Grayish-blue);
    border-radius: 12px;
}

I hope you find it useful! πŸ˜„

Happy coding!

Marked as helpful

0

Please log in to post a comment

Log in with GitHub
Discord logo

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