Design comparison
Solution retrospective
I had a problem with increasing the widths every time I did so, there was scrolling which I didn't like. If anyone has a tip for this that would be lovely.
Community feedback
- @UnderdogScripterPosted about 3 years ago
Can you give more details about the problem? Which element are you talking about?
0@ezraakankwasaPosted about 3 years ago@UnderdogScripter When I apply width on the div named card, what's holding everything in place, it displaces everything and there is scrolling from the side. What i'm asking is how do I increase the width without casing scrolling (height gain)?
0@UnderdogScripterPosted about 3 years ago@ezraakankwasa It's a pretty normal thing to happen because the height of your image increases when its width increases with the overall card's width.
.card-img { width: 100%; border-top-left-radius: 19px; border-top-right-radius: 19px; }
Now to your question, if you really wanna eliminate the scroll you can give the image this property
height: 100%
in a div with the following properties (if the scroll is still there just decrease the height of the div)div { height: 200px; }
Hope that helps!
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