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

First Attempt at CSS and HTMl with the QR code component

zeph_w 50

@ZephaW

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


The part i found most difficult was working with media queries as this is not something that i am used to. What are some tips on working with media queries that you'd recommend?

Community feedback

Daniel 🛸 44,230

@danielmrz-dev

Posted

Hello @ZephaW!

Your project looks great!

I noticed that you used padding to place the card in the middle of the page. Here's a very efficient way to center the card:

  • Apply this to the body (in order to work properly, don't use position or margins):
body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

I hope it helps!

Other than that, great job!

Marked as helpful

0

zeph_w 50

@ZephaW

Posted

applied and it worked perfectly! Thanks buddy! @danielmrz-dev

0
raya 2,850

@rayaatta

Posted

Hello 👋zeph_w, Congratulations on completing this challenge 🎉.

I have some suggestions you might find useful.

1 In order to make your html more semantic replace <div class="container"> With <main class="container">. This changes nothing visually but Using it makes all the difference. Using semantic markup improves

SEO

And

accessibility

You can find out more about the main tag in this article 📰.

2 Since the qr code image is not decorative fill it's alt attribute with text describing where it leads to i.e ```alt="qr code leading to frontend mentor.io"

3 I noticed you used many media queries but this could have been much simpler if you used

    .container {
        max-width: min(90%,21rem);
}

This is a summary of all the media queries. I hope this helps

Your solution is nice

Happy coding ✌️

Marked as helpful

0

zeph_w 50

@ZephaW

Posted

really appreciate the feedback. I have seen different developers using the "main class" but I didnt understand what it meant .Thank you! @rayaatta

1
Raza Abbas 790

@RazaAbbas62

Posted

Hi, When working with media queries, prioritize a mobile-first approach, test incrementally at key breakpoints, use relative units, optimize images, consider both orientations, and leverage Flexbox and Grid for responsive layouts. Consistency and testing on real devices are crucial for a seamless user experience.

Enjoy Coding Journey :)

1

zeph_w 50

@ZephaW

Posted

will do. Thank you @FazeenIjaz !

1

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