Design comparison
Solution retrospective
I would like to know how to make the desktop version responsive so that when I resize the window the height grows accordingly instead of content overflowing. Thanks.
Community feedback
- @correlucasPosted over 2 years ago
Hello Monk, congratulations for your solution.
Answering your questions:
Your component isn't responsive due the
fixed
value you've set for thewidth
for the container/columns. If you setwitdth: 600px;
for an element, the css will understand that the element should be the value(600px) you've set not more not less. Usemax-width
inside the.container
so when you resize the window the container content could contract to fit the screen space. Note that you can also usemin-width
depending of the situation.Pay attention also to the container height, there's no need to set a height because the component height will resize with the spaces from the elements padding/margin as the h1, p, button. You've used
height:100vh;
inside the container and this will make the component grows a lots. Addmin-height:100vh;
to the body instead.I hope this helps you improve your solution, happy coding 👊
Marked as helpful0
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