Design comparison
SolutionDesign
Solution retrospective
Hi. I would like to know how to center divs vertically without using a flexbox or grid.
Community feedback
- @cologniaPosted over 1 year ago
Hihi! Yes, this is an elegant way to center things, please check out this link on freecodecamp . Really good explanation with examples. Cheers, colognia
Marked as helpful0 - @XeotheosisPosted over 1 year ago
You can try position:absolute on the target component you are trying to align and position:relative on the parent of that target component (if there is one).
Marked as helpful0
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