Design comparison
Solution retrospective
I tried to center the image vertically with align item but it would'nt work so I used margin, want to make sure that's OK. Also if the classes I used are OK.
Community feedback
- @dnewbie25Posted over 2 years ago
Hello! I see you had some trouble centering vertically. When you have this type of components, you can use
display: flex
as an easy way to center the container. You declare the display as flex for thebody
and then adjust the alignment. It would look something like thisbody { display: flex; justify-content: center; align-items: center; }
The above should center your container as well as the element with the class
attribution
you have.Flex can be sometimes hard to manipulate when you have many elements, but this challenge is a good place to start getting used to it. Take a look at this guide:
https://css-tricks.com/snippets/css/a-guide-to-flexbox/
After that, you can use flexbox inside the container to position the QR and the text.
0
Please log in to post a comment
Log in with GitHubJoin 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