I've recently started to experiment with Bulma and Fontawesome, and I found tricky to align the icons vertically and horizontally. My situation is the following.
- I downloaded Bulma via npm:
npm i bulma --save-dev; - I imported the relevant Fontawesome file as per the Bulma Docs:
<script defer src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"></script>; - Created a basic input element field with an icon on the left and another on the right:
<div class="control has-icons-left has-icons-right"> <input class="input" type="text"> <span class="icon is-small is-left"> <i class="fas fa-map-pin"></i> </span> <span class="icon is-small is-right"> <i class="fas fa-check"></i> </span> </div>
That resulted in the icons to be weirdly aligned to the top-left corner of their respective positions. I tried to center them by appending a has-text-centered class to the span element but that didn't work. Any workaround?