How to put Font-Awesome icon in a button? [closed]

-1

I want to make a button with an arrow inside, I tried but I could not do it, anyone who can help I thank. NOTE: I am not using any framework

    
asked by anonymous 19.08.2017 / 05:00

2 answers

1

Hello,

You can put it if it is a <button> tag, which has the same behavior as input . Ex:

<button type="submit"><i class="fa fa-plus"></i> Cadastrar</button>
    
19.08.2017 / 05:02
1

Basically you will insert your icon inside the input, like this: <button> CODIGO ICONE </BUTTON> practice example (CSS IS MERELY ILLUSTRATIVE):

button{
  width:200px;
  height:30px;
  font-size:20px;
  color:white;
  background-color:#259b4c;
  border-style: solid;
  border-color: #259b4c;
}
<script src="https://use.fontawesome.com/62e43a72a9.js"></script><p>Icone+texto:</p><buttontype="submit"><i class="fa fa-arrow-right" aria-hidden="true"></i> clica aqui, vai</i></button>

<p>Icone:</p>
<button type="submit"><i class="fa fa-arrow-right" aria-hidden="true"></i></button>
    
19.08.2017 / 06:06