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: https://github.com/mrintoxx/ProductReview
- Live Site URL: https://mrintoxx.github.io/ProductReview
- Semantic HTML5 markup
- CSS custom properties
- Mobile-first workflow
First time using the srcset, need to iprove some skills
<img
srcset="
images/image-product-desktop.jpg 600w,
images/image-product-mobile.jpg 686w
"
sizes="(max-width: 600px) 686px, 300px"
src="images/image-product-desktop.jpg"
alt="A bottle of perfume surrounded by foliage"
/>Some media responsive transform
@media only screen and (max-width: 600px) {
.card{
flex-direction: column;
}
.card-img-holder
{
min-height: 100%;
}
.card-img-holder img{
border-top-left-radius: 20px;
border-top-right-radius: 20px;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
.card-desc{
min-height: 450px;
width: 100%;
justify-content: space-between;
padding: 5% 0;
}
.card-desc p{
margin: 15px 15px;
}
.card-desc h3{
margin: 0 15px;
font-size: .9rem;
}-- Improve responsive design. -- Upgrade HTML knowledges
- Frontend Mentor - @Mrintoxx


