Design comparison
SolutionDesign
Community feedback
- @Bader-IdrisPosted over 1 year ago
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 { display: 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
0@d3vnicolasPosted over 1 year ago@Bader-Idris The container is aligned to the center, the difference is that there is an element below it. I used grid to align, it might be useful for you.
.wrapper { display: grid; } .wrapper .container { place-self: center; }
0@Bader-IdrisPosted over 1 year ago@d3vnicolas there're many good ways, keep going🎊
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