Design comparison
Solution retrospective
Didn't know how to set size of card to be responsive and not too wide at the same time
Community feedback
- @geomydasPosted 5 months ago
use max-width
1@fluxsiarskiPosted 5 months ago@geomydas But I'm still confused because I saw a solution https://github.com/oge-dev/Social-Links-Profile where the description text worked as the whole width of the card, when I removed the description, the whole card collapsed on both sides. I think this should not be the case.
Where would you recommend giving this max-width to make my card not so wide?
0@geomydasPosted 5 months ago@fluxsiarski I haven't read your css code yet but here is general tips but try it on your code aswell
set the max-width on the card to prevent it from growing, remove any heights you have set on the card aswell as it may overlow. don't use width for this case since it isnt responsive and likely wont resize on smaller devices.
it may also shrink if you havent set a height yet, so use a min-height aswell. you shouldn't set height but if mandatory use min-height, and not height
Marked as helpful0@geomydasPosted 5 months agoUpdate: Read your code, what you need to change is this:
--Remove padding on the button container, that is the reason why the buttons look shitty on smaller devices
--Decrease max-width on the card container, Prev 600px, New 350px
That's really all, also I ran your code on my PC, I removed the description but it doesn't collapse
Marked as helpful0@fluxsiarskiPosted 5 months ago@geomydas I really appreciate you took the time to check my code and give me tips on what I should change 🫶🏻 . Have a nice day
0
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