Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Profile Card Page using Html and Css

@yusufdimari

Desktop design screenshot for the Profile card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

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?

Community feedback

Faris P 2,810

@FarisPalayi

Posted

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 add 100vh 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

1

@yusufdimari

Posted

@FarisPalayi Thank you🙏

1

Please log in to post a comment

Log in with GitHub
Discord logo

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