Blog preview card created with HTML & CSS

Please log in to post a comment
Log in with GitHubCommunity feedback
- P@assiduousdev
Great work here @lisagriggs! However, your card's width is not responsive. It breaks when the viewport's width is less than 400. You may use the max-width property instead of width, as width is fixed so it will not automatically adjust based on its container! This should be similar on how you handled its height.
With that in mind, you may also want to take a look at object- CSS properties to properly maintain the card's image aspect-ratio. Here is a MDN reference.
Lastly, it's good that you used the article tag for this card but the image is outside of it. The image itself is a part of the card. You may consider wrapping the "whole" card with an article tag instead of a section. Here is a MDN reference.
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