Responsive component using Grid & Flexbox

Solution retrospective
Hello !
Could you give me a tip about positioning component so that it is always verticaly centered on the body ?
I've tried using margin top on different width but it always seems to be whether too far from the top or too close on certain viewports.
would wrapping my compotent in a main section using flex & margin auto could help to ensure the component stays exactly centered ?
(it does matter for the screenshot front end mentor takes of solution :)) thanks in advance, best regards
Please log in to post a comment
Log in with GitHubCommunity feedback
- @valvrauu
Hello, to center, remove all these margins and use in the body:
-display: flex; -align-items: center; -justify-content: center;
Marked as helpful
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