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
Not Found
Not Found
Not Found

Submitted

QR-code using VS code.

NugyTomas 220

@NugyTomas

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


Hello! This was my first solo project so everything seemed lowkey difficult to me, I had to refresh what I've learned so far, but in the end it looks similar to challenge, so I'm happy with it. I will be glad for any feedback, suggestions, etc... As I said I'm a beginner so I will be happy for anything :). Thanks! Best regards, Tom

Community feedback

@0xabdulkhaliq

Posted

Hello there 👋. Congratulations on successfully completing the challenge! 🎉

  • I have other recommendations regarding your code that I believe will be of great interest to you.

CSS 🎨:

  • Let me explain, How you can easily center the component for better layout without usage of absolute positioning.
  • We don't need to use absolute to center the component both horizontally & vertically. Because using `absolute' will not dynamical centers our component at all states
  • To properly center the component in the page, you should use Flexbox or Grid layout. You can read more about centering in CSS here 📚.
  • For this demonstration we use css Grid to center the component
body {
    min-height: 100vh;
    display: grid;
    place-items: center;
}
  • Now remove these styles, after removing you can able to see the changes
.card {
    position: absolute;
    margin-top: 50%;
}

HTML 🏷️:

  • This solution lacks semantic markup, which causes lacking of landmark for a webpage and allows accessibility issues to screen readers
  • What is meant by landmark ?, They used to define major sections of your page instead of relying on generic elements like <div> or <span>. They are use to provide a more precise detail of the structure of our webpage to the browser or screen readers
  • For example:
    • The <main> element should include all content directly related to the page's main idea, so there should only be one per page
    • The <footer> typically contains information about the author of the section, copyright data or links to related documents.
  • So fix it by replacing the <div class="card"> element with the semantic element <main> in your index.html file to improve accessibility and organization of your page.

.

I hope you find this helpful 😄 Above all, the solution you submitted is great !

Happy coding!

1

NugyTomas 220

@NugyTomas

Posted

Good morning @0xAbdulKhalid !

Thanks alot for the help I really appreciate it. I will try to fix this as soon as possible.

0

@0xabdulkhaliq

Posted

@NugyTomas Glad you found it 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