Design comparison
Solution retrospective
When I make the height slightly smaller, the inside of the container gets really congested. What's the best practice to avoid that?
Community feedback
- @amalkarimPosted almost 2 years ago
Hi Klaidas 👋
I don't know if this is best practice or not, but I will not specify the height of a component if it's not required. Because not all browsers height are the same. For example, you could try to visit the preview site using smartphone in landscape mode. Some text inside the card will move outside because the card's height is less than its content. To avoid that, remove all
height
property incontainer
. Also, changeheight: 100vh;
inbody
tomin-height: 100vh;
.Hope this helps. Happy coding!
2
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