Simple project using just HTML and CSS

Solution retrospective
When using margins to create vertical space between elements should the margin be added to the bottom of the upper element or the top of the lower element? Does it matter, and / or is it a best practice matter?
Please log in to post a comment
Log in with GitHubCommunity feedback
- @Bader-Idris
You can set the container in the middle of the screen whatever user changes it when you add these properties to it in CSS:
.container { position: absolute; top:50%; left: 50%; transform: translate(-50%, -50%); }
the new feature is transform, it has many lovely properties you can discover, I personally love it. Hope it's useful
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