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

HTML, CSS, RESPONSIVE DESIGN

Evan_05โ€ข 110

@GP2023J

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

Lucas ๐Ÿ‘พโ€ข 104,420

@correlucas

Posted

๐Ÿ‘พHello Evan, congratulations for your solution!

Your component is good done, all the design elements match, you need only to work around cleaning the code a little bit, deleting some unnecessary elements in the html structure and to align the component to the center.

Here's my tips:

Use <main> instead of <section> since the card is the main thing in the whole html and there's no other section and instead of using margins to align the component, you can use display: flex and min-height: 100vh inside the body to align the card to the center, this happens because the child element use the parent height to get the alignment, so this why you need min-height: 100vh.

See the the line below with your code fixed:

body {
    min-height: 100vh;
    background-color: var(--lightGray);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.card-container {
    width: 320px;
    display: flex;
    height: 525px;
    /* margin: 60px auto; */
    padding: 16px;
    background-color: var(--white);
    border-radius: 16px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

Hope it helps and happy coding!

0

Evan_05โ€ข 110

@GP2023J

Posted

@correlucas Thank you!!

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