Not Found
Your session has expired please log in again.
Your session has expired please log in again.
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

QR Card Component

Knastβ€’ 20

@knast

Desktop design screenshot for the QR code component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


I am unsure if the card has the correct width and height as well as the fonts have proper sizes.

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.
  • Always avoid skipping heading levels; Starting with <h1> and working your way down the heading levels (<h2>, <h3>, etc.) helps ensure that your document has a clear and consistent hierarchy. Source πŸ“˜

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 πŸ“˜.
  • 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.
  • Consider centering your element using either a grid or flexbox layout for more precise and responsive centering.

    For Flexbox:

    body {
      min-height: 100vh;
      display: flex;
      justify-content: center;
      align-items: center;
      /* Additional styles if needed */
    }
    

I hope you find it useful! πŸ˜„ Above all, the solution you submitted is great!

Happy coding!

1

Knastβ€’ 20

@knast

Posted

@MelvinAguilar Thank you for really detailed response and tips! I will surely implement them when I find time. I wish you happy coding too!

0
adrnmatosβ€’ 150

@adrnmatos

Posted

Hi. Try putting some right and left padding to the blue container. It should grow to fit both padding and image sizes.

0

paradox143yabβ€’ 10

@paradox143yab

Posted

okay i will tnx@adrnmatos

0
Knastβ€’ 20

@knast

Posted

@adrnmatos I've already used padding on this container.

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