Design comparison
SolutionDesign
Solution retrospective
1- how to stack them in mobile view
Community feedback
- @VCaramesPosted over 2 years ago
Good job!
At quick glance I noticed that your card is not centered in your page.
To fix, add the following to your
body
:heigh: 100vh;
display: grid;
justify-content: center;
align-content: center;
Marked as helpful0 - @correlucasPosted over 2 years ago
👾 Hello Omar, congratulations for your solution!
Answering you question:
To set the mobile view you need a media query, you've set it almost correctly, note that there's no need for
grid-template-row;
since you can usegrid-template-row: 1fr;
to make it a single column component. See the code fixes below@media only screen and (max-width: 550px) .container { grid-template-columns: 1fr; /* grid-template-rows: 1fr 350px; */ max-width: 100%; }
Applying that you need only to give some padding to the button that is attached to the component bounds.
Hope it helps you and 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