The icon goes behind the button, see the screenshot.

enter image description here

<i class="fas fa-calendar-alt" style="margin-left:-120px;font-size:22px;color:#059bce"></i> 

  • I insert code using Font Awesome 5 - Mursik
  • which tag do you use? - user33274
  • tag <i>, code above. - Mursik
  • and the font-awesome hooked up? - user33274
  • one
    you show all the code - it’s not clear what it’s coming from - to insert font-awesome in the stackoverflow snippet use font-awesome cdn from bootstrap - user33274

1 answer 1

If I understand you correctly, it should look like this. tag i need to be inserted into the object in which you want to see it. And after that you can give the parent position: relative , and the position: absolute icon itself and shove it wherever you want and it will not hide anywhere.

 <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" rel="stylesheet"/> <button>asdasd <i class='fa fa-bars'></i> asdasd</button> 

  • I asked if font-awesome is connected or not - user33274