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.
Building a responsive webpage is a challenge that requires a lot of planning and thinking. This challenge is a great way to get started with the planning process.
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: Solution
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
- CSS Grid
- Mobile-first workflow
I found out that in css you can add conditions for the size of the screen. This is a great way to make your website responsive.
@media screen and (max-width: 600px) {
.main {
height: 90%;
width: 87%;
}
...
}
- Correct padding and margin
- Correct positioning of elements
- Correct overflow