Social-links-profile design using HTML and CSS
Design comparison
Solution retrospective
i finally got the card to be well aligned and what i would do is to tackle repsonsiveness next
What challenges did you encounter, and how did you overcome them?Getting the card to be well centered and aligned, still not sure it is even aligned well.
Updated: Finally got the card to be well centered horizontally and vertically.
What specific areas of your project would you like help with?Well aligning the card well on the screen and also adding more effects to the page later on using JS
Community feedback
- @RealKendprPosted 7 months ago
To center your card both vertically and horizontally, you can use
grid
: 1.Make sure that your card is wrapped inside onediv
:<div class=container> //this can also be the body tag directly <div class=card>...</div> </div>
2.And then the
.card
in CSS:.card { display: grid; place-items: center; //this is a shorthand for: //justify-content: center; and align-items: center; }
-
You can read more about grid here: A Complete Guide to CSS Grid
-
and centering a div here: 7 ways to center with CSS
0 -
Please log in to post a comment
Log in with GitHubJoin 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