
Solution retrospective
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.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @haquanq
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 helpful - If you want to center a single element horizontally, you can use
- @gabriel-m-dev
good!
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