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 QR Code

Megan May 170

@mooogz

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


I did this mainly as a HTML/CSS refresher and to practice pushing to Github. I realized I forgot a lot about flexbox and responsiveness.

Community feedback

hitmorecode 6,230

@hitmorecode

Posted

Congratulations well done. Just a few tips

  • Make a habit of using css reset.
/* this is a simple css reset. this reset will remove unnecessary empty spaces */
* {
    margin: 0;
    padding: 0;
    box-size: border-box;
}
  • In this case you can use flexbox or css grid to place the card in the middle of the page
body { 
    display: flex; 
    justify-content: center;
    align-items: center;
    flex-direction: column;
    min-height: 100vh; /* make a habit of setting the height of the body to min-height 100vh. this will make the height more responsive */
    
    font-size: .8rem;
    font-family: "Outfit", sans-serif;
    text-align: center; 
    color: hsl(218, 44%, 22%);
    background-color: hsl(212, 45%, 89%);	
}

main {
    width: 350px;
    height: 500px;
    background-color: white;
/*     margin: 10% auto; */ /* you can remove this, flexbox will do the job */
    padding: 3% 1% 0 1%;
    border-radius: 10%;
}
  • If the border radius is less than 50%, avoid using % to dimension border radius. Use px, rem, em instead. You have a border radius of 10% if you look closer you will see a difference in the radius.

Marked as helpful

0

Megan May 170

@mooogz

Posted

@hitmorecode Ahh I completely forgot about the reset! This all helps a lot, thank you. I need more practice with flexbox definitely so I'll work on that next.

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