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: GitHub
- Live Site URL: Product preview card component
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
- Mobile-first workflow
- Media Queries
This was my first project to put my knowledge in CSS on practice I learn to use the Display flex in a correct way to positon the secundaryPrice element in the same way as the design as well as the cardContainer for the Desktop design and set the box in the middle, I also learned how to change the image for one to other design using the content property
.secundaryPrice {
display: flex;
font-family: "Montserrat", sans-serif;
align-items: center;
text-decoration: line-through;
color: var(--Dark_grayish_blue);
}
.cardContainer {
width: 600px;
height: 450px;
display: flex;
/* flex-direction: row; */
margin-top: 175px;
margin-left: auto;
margin-right: auto;
}
.containerImage {
content: url(../images/image-product-desktop.jpg);
}
learn how to size the fonts because I feel that was the only thing I fail in this project keep practice using the flexbox.
- Frontend Mentor - @AlanLopRey