@MukarramHaq
Posted
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
@tortaruga
Posted
hi @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!
@MukarramHaq
Posted
@tortaruga that solve my issue. Thank you so much for the help!