Solution | Product Preview Card Component | HTML, CSS, Floating Images

Solution retrospective
How do I position both image icon and text in the "Add to Cart" button? I just managed to awkwardly space them according to the image. Does anyone have any solution?
Please log in to post a comment
Log in with GitHubCommunity feedback
- Account deleted
Hey @Rhythm001, regarding your question:
You will insert the image and text inside the Button Element and use Flex to align them.
<button> <img src="images/icon-cart.svg" alt="" aria-hidden="true"> Add to Cart </button>
Happy Coding! 👻🎃
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