Amal Karim ✅• 1,290
@amalkarim
Posted
Hi Apo. Congratulations for completing your first challenge!
I'm not a professional, though. But your solution is quite nice. You only need to create a media query for mobile view.
Before that, change height: 100vh;
to min-height: 100vh;
for .container
(try to view the preview site using smartphone in landscape mode to see why)
Here's an example of media query for mobile:
@media (max-width: 768px) {
.card {
flex-direction: column;
max-width: 100%;
overflow: hidden;
}
.card__image {
height: 200px;
max-width: 100%;
}
.desktopImage {
display: block;
border-radius: 0;
object-fit: cover;
}
.card__content {
width: 33rem;
box-sizing: border-box;
border-radius: 0;
max-width: 100%;
}
}
Hope this helps. Happy coding!
1