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/ujjwalgarg100204/Frontend-Mentors-Product-preview-card-component-solution
- Live Site URL: https://ujjwalgarg100204.github.io/Frontend-Mentors-Product-preview-card-component-solution/
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
- CSS Grid
- Mobile-first workflow
I learned about <picture>
tag and how to use it and put media queries right inside in HTML.
To see how you can add code snippets, see below:
- I learned how to control size of image using its container tag
img { max-width: 100%; } container { width: 600px; }
- I learned about 100vh problem in mobile devices
body { height: calc(100vh - 0.1px); }
- Picture Tag - This helped me for putting image according to screen size, and I am going use it going forward.
- Website - Ujjwal Garg
- Frontend Mentor - @ujjwalgarg100204
- Instagram - @ujjwalgarg100204
- Linkedin - @ujjwalgarg100Screenshot 2023-06-03 at 10-33-41 Frontend Mentor Product preview card component.png204
- Twitter -@UjwalGarg100204
tbsankara YouTube video helped me a lot whenever I ran into problems. He also taught me about the picture tag in HTML