This is a solution to the Product preview card component challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Users should be able to:
- View the optimal layout depending on their device's screen size
- See hover and focus states for interactive elements
- Solution URL: Click here to see solution
- Live Site URL: Click here to preview the website
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
@media (max-width: 860px) {
.card {
width: 345px;
height: 610px;
flex-direction: column;
}
.img-container {
background-image: url(./images/image-product-mobile.jpg);
max-height: 40%;
}
.details-container {
padding: 25px;
width: 100%;
height: 100%;
}
.details-container span {
font-size: 12px;
}
.details-container h1 {
font-size: 30px;
line-height: 1;
}
.details-container p {
font-size: 14px;
line-height: 1.6;
}
.add-cart-btn {
padding: 15px;
}
}
- Frontend Mentor - @KtMoGo
- Twitter - @KavinduT8456