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

Mishael Josephβ€’ 210

@Mishael-Joe

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, I'm Mishael Joe by name. This was a fantastic project to work on (it was actually easy tho). But, I'm not so sure if I got the media query right, please can someone check it for me? Project link

Community feedback

Umer Khokharβ€’ 190

@Umer-Khokhar

Posted

Hi thereπŸ‘‹,

Always use flexbox to center items (in your case card)

.card {

display: flex;

justify-content: center;

align-items: center;

flex-direction: column;

}

One thing more that in media quries don;t set width of img tag set the width to the whole container,

As you set the max-width to image your design looks bad in mobile devices

@media(max-width: 370px) {

.card {

    width: 200px;
}

In the card case,Never use media quries as set width of card mobile first so

You should not need any quries I hope this will help you 😊

Marked as helpful

0

Mishael Josephβ€’ 210

@Mishael-Joe

Posted

@Umer-Khokhar Thank you so much sir.

0
Umer Khokharβ€’ 190

@Umer-Khokhar

Posted

@Mishael-Joe

Your Welcome 😊

0
Abdul Khalid πŸš€β€’ 72,160

@0xabdulkhalid

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 incorrect usage of semantic markup, which causes lacking of landmark for a webpage
  • So fix it by replacing the <section class="card"> element with the semantic element <main> 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

HEADINGS ⚠️:

  • And, this solution has also generated accessibility error report due to lack of level-one heading <h1>
  • Every site must want at least one h1 element identifying and describing the main content of the page.
  • An h1 heading provides an important navigation point for users of assistive technologies, allowing them to easily find the main content of the page.
  • So we want to add a level-one heading to improve accessibility by reading aloud the heading by screen readers, you can achieve this by adding a sr-only class to hide it from visual users (it will be useful for visually impaired users)

CSS 🎨:

  • let me explain, How you can easily center the component.
  • We don't need to use margin and padding to center the component both horizontally & vertically. Because using margin or padding 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 {
    margin: 3rem auto;
}

.

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

Happy coding!

0
IRVINE MESAβ€’ 1,855

@DrMESAZIM

Posted

hi Joe this was great work from you since I also noticed this was your first project. I would like you to work on the background color so as to match better with the design expectations.

If you find my suggestions difficult to implement . You can join us for our weekly live streams where we assists other developers by providing helpful reviews and feedback with live Frontend mentor code edits and reviews on this link. Your solution will also be reviewed and edited by myself link here >> https://youtube.com/live/L6WTd7HRTMM?feature=share

0

Mishael Josephβ€’ 210

@Mishael-Joe

Posted

@DrMESAZIM Thank you so much Sir. How do I join the live stream?

0
IRVINE MESAβ€’ 1,855

@DrMESAZIM

Posted

@Mishael-Joe thats great

0
IRVINE MESAβ€’ 1,855

@DrMESAZIM

Posted

link here >> https://youtube.com/live/L6WTd7HRTMM?feature=share@Mishael-Joe

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