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 Component

Sir Floppaβ€’ 150

@Sir-Floppa

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

Hassia Issahβ€’ 50,670

@Hassiai

Posted

Replace <div class="card"> with the main tag to fix the accessibility issue. click here for more on web-accessibility and semantic html

To center .card on the page using flexbox, add min-height: 100vh to the body.

Give h1 and p the same font-size of 15px which is 0.9375rem, text-align: center, the same margin-left, margin-right and margin-top values. Give p a margin bottom value.

For a responsive content replace the width in .card and img with max-width.

Use relative units like rem or em as unit for the padding, margin, width values and preferably rem for the font-size values, instead of using px which is an absolute unit. For more on CSS units Click here

Hope am helpful.

Well done for completing this challenge. HAPPY CODING

Marked as helpful

0

Sir Floppaβ€’ 150

@Sir-Floppa

Posted

@Hassiai Thank u! I added those sugestions to the code πŸ‘€what i dont get tho, is why should I make h1 and p the same font-size πŸ€”h1 is clearly bigger in the desing.

0
Abdul Khaliq πŸš€β€’ 72,660

@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.

HTML 🏷️:

  • This solution generates accessibility error reports, "All page content should be contained by landmarks" is due to non-semantic markup, which lack landmark for a webpage
  • So fix it by replacing the <div class="card"> element with the semantic element <main> along with <div class="attribution"> into a <footer> in your index.html file to improve accessibility and organization of your page.
  • 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 convey the structure of your page. 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

.

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

Happy coding!

Marked as helpful

0

Sir Floppaβ€’ 150

@Sir-Floppa

Posted

@0xAbdulKhalid Thank u! I've already added those sugestions to the code πŸ‘€ just learned about semantic HTML and makes complete sense, thank u again!

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