Design comparison
Solution retrospective
Lots of thanks to anyone who might be taking a bit amount of time to review or to leave any precious piece of advice for this enthusiastic beginner. :)
And as always, big thumbs up for the community! :D
Community feedback
- @ayouchanePosted over 1 year ago
Hey Sorin, Congrats on finishing the challenge!
Regarding the positioning of your elements, opting for a Flex or Grid display algorithm can give you more control over the positioning of your elements. I strongly urge you to start looking into CSS Flex first and then CSS Grid. These two come with CSS out of the box.
As for the icons, it's going to be an svg element that you get from somewhere like Heroicons, Font Awesome or Google Icons.
I hope this helps.
Marked as helpful0 - @mohamedelkashef1Posted over 1 year ago
You can create a button in HTML
<button>Add To Cart</button>
Use that code to style that button in CSS
button { display: flex; justify-content: center; align-items: center; text-align: center; gap: 10px; padding: 15px; color: #fff; font-weight: 700; border: none; background: hsl(158, 36%, 37%); border-radius: 8px; width: 100%; } button::before { content: ""; width: 15px; height: 16px; background: url("./images/icon-cart.svg"); }
I hope you find this helpful
Happy coding!
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