I used flexbox positioning and CSS manipulation through JavaScript.

Solution retrospective
I couldn't add the icons inside the inputs fields, any help will be appreciated.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @developedBySwan
You need one parent element to add the icon. And then change the background color of parent element same with input box. This is my code. I hope this will help you.
<div class="input-box"> <span> <img src="./images/icon-dollar.svg" alt="dollar-sign"> </span> <input type="number" class="input-dollar-number" id="input-dollar-number"></div>
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