Profile Card Page using Html and Css

Solution retrospective
What aspect of the code did i not implement very well? how can i make my code to be cleaner? Whats the best way to center a container to the middle of page?
Please log in to post a comment
Log in with GitHubCommunity feedback
- @FarisPalayi
Nice work tackling your first solution 👏
- About centring a container to the middle of the page, first you need to set a
min-height
/height
to the page. For that, you can add100vh
min-height
to the body tag. 100vh means the page will have the same height as the viewport's height. - And then you can use any of these methods to position it in the centre.
I personally like to use the
dispaly: grid; place-items: center;
method since it is the shortest. But, you can use any way that you are comfortable with.And also, there are a lot of other ways you can do this. And that's how CSS is, there'll be a ton of other ways you can do one thing in CSS. And most of the time there's no one right way to do it.
Have fun coding 🎉
Marked as helpful - About centring a container to the middle of the page, first you need to set a
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