Design comparison
SolutionDesign
Community feedback
- @pperdanaPosted over 1 year ago
Hi, Well done on completing the challenge! π
- I have more suggestions regarding your code that I believe will be highly beneficial for you.
π Center an element both horizontally and vertically
Using flexbox:
Set the display property of the parent element to "flex" and use the "justify-content" and "align-items" properties to center the child element both horizontally and vertically. For example:
.parent { display: flex; justify-content: center; align-items: center; } .child { /* other styles for the child element */ }
I hope this information was beneficial for you! π
Happy codingπ€
Marked as helpful1
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