Product Preview Card using CSS.

Solution retrospective
During the challenge, I found it difficult at some point to set a fixed layout without the card increasing in size as the screen size increases. I will like to know the best width and height to apply to achieve this. Though I was able to figure it out but I will still like to hear from someone here. Thank you.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @Excelsior2021
Hi Usman,
I don't know if I understand correctly. Are you trying to stop child elements overflowing the parent?
If so, you can set
max-width: fit-content
andmax-height: fit-content
This way the the child elements will not overflow the parent.
Marked as helpful
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