Blog card with Flexbox

Solution retrospective
I feel like I'm making progress. The first challenge took me a while to complete, but I did this one much faster. There's still a lot to improve, but it's already a sign of growth.
What challenges did you encounter, and how did you overcome them?I didn’t have any trouble with this challenge. The feedback from the first one helped me a lot.
What specific areas of your project would you like help with?I’d like some help with CSS. I received feedback that we should rarely define fixed width and height for an element. When should I define them, and when should I let the element adjust to its content (and how can I do that)?
Please log in to post a comment
Log in with GitHubCommunity feedback
- @Peepytoo
for adjusting elements to fit its content, you can set the width of the element (the image) to 100%, and set a specified height for the image; these will be the dimensions of the container that you want the image to fill. You can then use object-fit and set it to "cover" (this will make the image fit the container that you have just set without changing the aspect-ratio of it). This makes it so that you don't have to define dimensions for the width of the image.
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