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 Challenge

@StrawHatTeamIt

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 my first challenge in Frontend Mentor so if you have any advice to improve the code please tell me so i could update it thank you.

Community feedback

Alan 160

@TheMax370

Posted

Hi Straw congrats on completing the challenge but I think you have a miss understanding with media queries and how responsive design works. So basically I saw your media query and you set min-width to 1440px, we all know that majority of designs in frontendmentor are meant for desktop devices with 1440px but your media query has a wrong approach I recommend you to search how to set 2 breakpoints in a media query and also take a look on how they work.

Also when making a web design remember to use the developer tools and use the device toolbar and resize your web design and see how it behaves in other devices so you can think of the approach you are going to take for the media queries.

Marked as helpful

2

@StrawHatTeamIt

Posted

@TheMax370 yeah thank you for you re advice and i tired to corrected it so if u can check it again please and thank you

0
Alan 160

@TheMax370

Posted

@StrawHatTeamIt Now its fixed but the element is displaying on the bottom instead of the center learn how flex works, and make your body flex.

Marked as helpful

0

@StrawHatTeamIt

Posted

@TheMax370 ok thank you

0

@davinceey

Posted

Hello StrawHatCoder. Congratulations on your first project! It looks wonderful on the whole. Just some little tips:

I tried using the Responsive tool on my Chrome Dev Tools and at width: 1440px, your solution becomes very much magnified that it loses it's form. You might want to look at your media query code @media screen and (min-width: 1440px) and change the min-width to max-width.

Hope this helps you. Happy Coding!💖

Marked as helpful

1

@StrawHatTeamIt

Posted

@davinceey Thank you sir I made the changes so if u can review it and thanks for your time .

0
Lucas 👾 104,420

@correlucas

Posted

👾Hi @StrawHatTeamIt, congratulations for your first solution!👋 Welcome to the Frontend Mentor Coding Community!

Great solution and great start! By what I saw you’re on the right track. I’ve few suggestions to you that you can consider to add to your code:

The approach you've used to center this card vertically is not the best way, because using margins you don't have much control over the component when it scales. My suggestion is that you do this alignment with flexbox using the body as a reference for the container.

REMOVE THE MARGINS

main {
    padding: 1em;
    /* margin-top: 8%; */
    /* margin-left: 40%; */
    width: 300px;
    background-color: white;
}

The first thing you need to do is to remove the margins used to align it, then apply min-height: 100vh to make the body height size becomes 100% of the screen height, this way you make sure that whatever the situation the child element (the container) align the body with display: flex and align-items: center / justify-items: center.

body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background-color: hsl(212, 45%, 89%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

✌️ I hope this helps you and happy coding!

Marked as helpful

0

@StrawHatTeamIt

Posted

@correlucas Thank you so much sir

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