Product Preview Card

Solution retrospective
I use Html and Css only.
Being new to code, I would like to know what tools I should use in the future for this type of challenge?
Other feedback welcome !
Please log in to post a comment
Log in with GitHubCommunity feedback
- @varunUk09
good job i have few suggestions for you
- avoid use of H1 more than once there should be only one heading in a perticular section
- use picture element if you wanna switch between images in different divices refer:w3shool picture element
- <h2 class="pro-cat">P E R F U M E</h2> don't do like this , if you want more gap between letters use letter-spacing instead.
- <img src="images/icon-cart.svg" alt="cart-icon"> try to put svgs instead of using them in img tag because svg a vector images they form where there code puts in means if you just directly add svg code you will save time to load them as a image from server.
5).pro-cat{ font-size: small; } wrap using <small></small> tag instead
6).new-price{ color:hsl(158, 36%, 37%); }
.old-price{ margin-bottom: 0; font-size: small; text-decoration: line-through; }
button{ width:100%; padding:1rem; background-color: hsl(158, 36%, 37%); }
here you have used hsl(158,36%,37%) 2times , follow DRY principle always use css variables if you think you will use that property more than 1 im giving you an example below: :root{ --color-1:hsl(158,36%,37%); }
now i can use var(--color-1) where i want this color and if in future client wants to change this color to different color so it will be simple easy for me to do this i will just change this color in root part. i hope all suggestions will help you and learn about flex please
Marked as helpful - @sweLL98
You can also use 'border-radius: 15px 50px 30px 5px' - first value applies to top-left corner, second value applies to top-right corner, third value applies to bottom-right corner, and fourth value applies to bottom-left corner)
You can see more here: https://www.w3schools.com/cssref/css3_pr_border-radius.php
I hope can help you that and to make you faster to write!
Marked as helpful
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord