Design comparison
Solution retrospective
choosing between FLEX n GRID was like choosing a life partner. I like the concept of grid, but seems grid doesn't like me...
Please, how do i make the overall height adapt to any screen size without having to scroll ??
Your thoughts and suggestions are highly appreciated...
Community feedback
- @imadvvPosted over 2 years ago
Hi Micheal, good job!
you can add
min-height:100vh
tobody
and.container
and also removeposition:relative
from.container
and add to italign-items:center
andpadding-inline:1rem
and then.container-1
andcontainer-2
they don't need any extra margin so you can remove all that margin safely. the final changer like so.body { /* ... */ min-height: 100vh; } .container { /* ... */ align-items: center; min-height: 100vh; padding-inline: 1rem; } .container-1 { /* ... */ /* margin: 21.875% 0 21.875% auto; */ /* ... */ } .container-2 { /* ... */ /* margin: 21.95% auto 21.95% 0; */ /* ... */ }
Hope this help ;) and happy coding!
Marked as helpful0@mykexiePosted over 2 years agoThanks a lot @imadbg01 that was super helpful 😊 updated my css
1
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