Design comparison
Solution retrospective
The ' Learning' : i couldn't make the background just fit only the word, but it's extend all the way; and also it's seems border radius not working on the image.
i really need some ideas how to make it work.
Community feedback
- @MikDra1Posted 3 months ago
To make the border-radius work on the image just use this code snippet. It will cut the overflow of the container so that you will get rounded corners on the image
.card-image { overflow: hidden; }
Hope you found this comment helpful 💗💗💗
Good job and keep going 😁😊😉
Marked as helpful1 - @geomydasPosted 3 months ago
You can use
fit-content
in the width or max-width so it the learning part will only take up the space it needs. Block level elements by default take up all of the space available in the line such as<h1>
,<p>
or an element set withdisplay: block
. You can also use inline-block as an alternative since you cant use margins on inline elemens1@geomydasPosted 3 months ago@Black-crypto-gif I hope you find it helpful!
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