Design comparison
SolutionDesign
Solution retrospective
What are you most proud of, and what would you do differently next time?
I completed a challenge for the first time on Frontend Mentor. I would continue to challenge myself to do more challenges to improve my web development journey.
What challenges did you encounter, and how did you overcome them?At first, I could not center the QR-code component to the center of the page. I had to read several documentations and practice it before I was able to overcome the challenge
What specific areas of your project would you like help with?I want to learn more about CSS layouts like positioning, alignments, and related CSS layout properties.
Community feedback
- @haquanqPosted 5 months ago
Hello 👋
About centering elements
- If you want to center a single element horizontally, you can use
margin-left: auto
andmargin-right: auto
ormargin: 0 auto
for short. - When you want to center more than 1 element at the same layout then it's better to use
display: flex
which allow more control over how elements are placed (read more here)
Keep it up, happy coding 👨💻
Marked as helpful1@larryQuaoPosted 5 months agoThanks, @haquanq, will keep that in mind and practice it...
0 - If you want to center a single element horizontally, you can use
- @gabriel-m-devPosted 5 months ago
good!
1
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