Design comparison
Solution retrospective
i don't know how to do icon
Community feedback
- @correlucasPosted over 2 years ago
Hey Mahmoud, congratulations for your challenge solution!
To insert the icon you can do like when you insert a normal image, in this challenge you've used a <button> but work the same as a <div> or other tag. See the code below:
<button class="cc"><img src="./images/icon-cart.svg" alt="shopping cart icon">Add to Cart</button>
Don't forget to add
display:flex;
to the button andheight: 100%;
to the img:.cc {display: flex; align-items: center;}
.cc img { height: 100%;}
I hope it helps you bro, keep coding!
0@MahmoudKasrawyPosted over 2 years ago@correlucas Ok, what do you think of my design?
0@correlucasPosted over 2 years ago@MahmoudKasrawy I think you did all good, the only thing I would change is the color green you've used for the button. Its a little bit different from the design file. Try this value:
hsla(157, 36%, 37%, 1);
0
Please log in to post a comment
Log in with GitHubJoin 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