Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

fontawesome user in placeholder

Tags:

html

css

icons

How To Put fontawesome in placeholder. Here is my code:

<div class="form-group">         
    <input class="form-control" placeholder="username" id="inputdefault" type="text" />
    <input class="form-control" placeholder="password" id="inputdefault" type="text" />
</div>
like image 206
Ephraim Avatar asked Nov 10 '17 08:11

Ephraim


1 Answers

Try this way:

input {
  padding:10px;
	font-family: FontAwesome;
   
}
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<form role="form">
  <div class="form-group">
    <input type="text" class="form-control empty" id="iconified" placeholder="&#xf2ba">
  </div>
</form>
like image 139
All about JS Avatar answered Nov 15 '22 13:11

All about JS