Beautiful! But you just forgot the card shadow.
@Hassan-Wanas
Posted
@vboechat Yes, thanks i will add this too.
Looking to hire developers?
how can I center the card vertically?
Beautiful! But you just forgot the card shadow.
@Hassan-Wanas
Posted
@vboechat Yes, thanks i will add this too.
@kxnzx
Posted
Hello @Hassan-Wanas,
Try this:
body { display: grid; place-items: center; margin-top: 20%; }
Also add a max-width and padding on the card.
Hope this helps you further!
@Anagho
Posted
@kxnzx You should try using flex-box. body { display: flex; justify-content: center; align-items: center; height: 100vh; }
Marked as helpful
@Hassan-Wanas
Posted
@kxnzx Thanks for your time.
but it does not work and I think there is no need for a display grid and place items.
It just moves to the center a little because of the margin-top.
but do you have any idea about why the live link is not showing the right design?
@Hassan-Wanas
Posted
@Anagho yes, it works. thanks and I saw your code and will back to it again to learn more. I have one more question: why or how can I make the live link work correctly?
edit: I changed the hosting for my card and it appears now normally when I open the link here but not in the comparison.
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