Submitted about 2 years ago
Solution | Product Preview Card Component | HTML, CSS, Floating Images
@Rhythm001
Design comparison
SolutionDesign
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?
Community feedback
- @VCaramesPosted about 2 years ago
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 helpful1
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