responsive page using flexbox and grid

Please log in to post a comment
Log in with GitHubCommunity feedback
- @DomCroatia
Hey, very nice challenge solution!
I would just add 1 thing. If you try minimize your viewport bit by bit (before media query is triggered) you can notice that vertical scroll appears. To fix that you can add to your img
width:100%;
and it will make it even more responsive.Also, on your media query for img you have 4 margin properties (margin-top, margin-left, margin-right and margin-bottom). There is shorter way to write that. You can just write
margin: -40px -40px 0 -40px
. It is shorthand to writing margin for all 4 sides and it goes top, right, bottom, left. You can also do margin with only 2 values, then first value is applied to top and bottom, and second to right and left (ex., margin: 20px 0). Also, writingpx
if value is 0 is not needed.
Join 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