Build a card with HTML, CSS using Visual Studio Code

Solution retrospective
i find it difficult to build the same as possible, but all good
Please log in to post a comment
Log in with GitHubCommunity feedback
- @dhan5a
Thank you for sharing your code. I learnt how to display images from my code to Github by understanding your solution :)
- @Victor-Nyagudi
Hi, Diaz.
Nice try on this one.
I noticed the card isn't centered on the page.
If you want to center something on the page, wrap everything inside the
<body>
tag in a<div>
, give it aheight: 100vh;
, and make it a flex container withdisplay: flex;
.Next, align what's inside it using
justify-content: center;
andalign-items: center;
.Here's a sample of what the code could look like.
body { height: 100vh; display: flex; justify-content: center; align-items: center; }
Here's a codepen I made demonstrating how to centrally align content on a page.
I hope this helps.
All the best with future solutions.
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