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


how to centralize the image and the text in the div

Community feedback

@mohammedlahboub

Posted

To Center a something You can use display: flex on the parent container like this:

.body{  
width: 100vw;  to make body width equal to screen width
height: 100vh;  to make body height equal to screen height
display: flex;  set display mode for body as flex
align-items: center;  to center items inside the body vertically
justify-content: center;   to center items inside the body horizontally
}

Hope this helps

2

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