Design comparison
Solution retrospective
I'm not sure if I did this "responsive thing" right, I mean, maybe it wasn't necessery to change all this margins and it should work automatically only on "flexbox". Please leave some feedback and tips. Also if there are any other mistakes please let me know. Thanks in advance!
Community feedback
- @9CB5Posted over 1 year ago
Great solution! There's absolutely nothing wrong with using padding/margin for spacing. But if you're looking to minimise your usage of them, you can use the
gap
property on your flex containers to adjust the space in between elements. For example, you can add the following style in your summary section:.summary { display: flex; flex-direction: column; gap: 1rem; }
With the above code you'll achieve the same layout without the need for margins.
Marked as helpful0@JustynaAleksPosted over 1 year agoGreat! Thank you very much! I'll try to change margins for gaps :) @9CB5
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