Design comparison
Solution retrospective
Role attributes kinda new to me. But i find a good resource in developer mozilla org :)
Community feedback
- @correlucasPosted about 2 years ago
πΎHi ericabao, congrats on completing this challenge!
Hereβs some tips to improve your solution code:
1.Use a CSS reset to avoid all the problems you can have with the default CSS setup, removing all margins, making the images easier to work, see the article below where you can copy and paste this css code cheatsheet: https://piccalil.li/blog/a-modern-css-reset/
2.The image is not responsive yet, a quick way to make any image responsive and respecting the container size is to add
display: block
andmax-width: 100%
to the<img>
selector. To improve the responsiveness even more adding the auto-crop property you can addobject-fit: cover
to make the image crop inside the container its inside.img { display: block; object-fit: cover; max-width: 100%; }
βοΈ I hope this helps you and happy coding!
0 - @VCaramesPosted about 2 years ago
Congrats @ericabao on completing this challenge!
Your card looks good!
To make your code semantically correct, you'll want to wrap your content in an <article> element. This because this is a card component.
For your images, its better to use the <picture> element, so it should look something like this:
<picture> <source media="(min-width: )" srcset="" sizes=""> <img src="" alt=""> </picture>
More info: Article element **Picture element
Happy Coding!
0
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