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

Flexbox, margin, padding, etc.

Manik Maityβ€’ 220

@ManikMaity

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


  1. I find it difficult to center the card in the body. Though I did it somehow.

Community feedback

Alexandreβ€’ 10

@mmuuttii

Posted

hey man you can use display:flex; align-items:center ; justify-content: center;

or sometimes i usally in tag body like this: body { display: grid; align-items:center; height: 100vh; }

really nice job

1
eyu.β€’ 360

@Eyuleo

Posted

you can center it easily with grid or flex

body{
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

or 

body{
   min-height: 100vh;
   display: grid;
   place-content: center;
}

hope this helps.

1

@dondelice257

Posted

you did it well, to center the div automatically you can use margin:auto and height:100vh

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