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

Responsive QR code

Amin 80

@AMINKHALAJI

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


in this challenge I focused on css-card.

Community feedback

hitmorecode 6,230

@hitmorecode

Posted

If you set min-height and add flexbox to the body, you don't need to use margin to place the card in the middle of the page.

body{
background-color: hsl(212, 45%, 89%);
/* add these lines to place the card in the middle of the page. */     
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
    
}
.card{
width: 320px;
height: 500px;
background-color: white;
border-radius: 20px;
margin-bottom: 20px;
/*     margin: 100px auto; */ /* you don't need this line. flexbox will take care of this */

}
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