Design comparison
Solution retrospective
I'm proud to have completed the challenge, but I think there was a simpler way to do it
What challenges did you encounter, and how did you overcome them?javascript didnt work on the live website, but it got fixed by adding a dot before the file path
What specific areas of your project would you like help with?any critique is welcome
Community feedback
- @MukarramHaqPosted 5 months ago
Good job, bro
I have a question? How did you stop the image from stretching? If you look at my project, it stretches and looks ugly. I would appreciate some help with that
0@tortarugaPosted 5 months agohi @MukarramHaq, for the image I used a div instead of img and set the image as its background, then I gave the div a width of 100% and an aspect-ratio of 16/9, that way it doesn't stretch!
.article-img { background: url(./images/drawers.jpg) no-repeat; background-position: center; background-size: cover; width: 100%; aspect-ratio: 16/9; }
I also change the flex-direction of the card to column for smaller screens. hope it helps!
1@MukarramHaqPosted 5 months ago@tortaruga that solve my issue. Thank you so much for the help!
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