Using position to manage avatar position

Solution retrospective
Hi there, I am wondering if the technique i am using to center my profile card is considered a hacky way or a standard
Please log in to post a comment
Log in with GitHubCommunity feedback
- @ericsalvi
Hey Tan,
Great job with this one. I noticed that this solution for most does not get too many comments as the project is fairly straightforward and simple. Glad you asked a question, however.
Taking a look at how you centered the card is not a hacky way at all and is typically the way people do it now compared to 10 years ago. Another method is using
display: grid;
andplace-content: center;
You still need the height set for this to work but place-content is shorthand for the grid for both horizontal and vertical alignment.Keep up the momentum!
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