Bootstrap

How to add an icon to the input background in Bootstrap
How to add an icon to the input background in Bootstrap

Let’s look at how to add icons to an input element, using the example of implementing a callback request form.

Callback request form code:

<form class="text-center">

<div class="h2">Request a call</div>



<div class="form-group form-group-lg inner-addon"> 
<i class="glyphicon glyphicon-user"></i> 
<input type="text" class="form-control" placeholder="Your name"> 
</div>


<div class="form-group form-group-lg inner-addon"> 
<i class="glyphicon glyphicon-earphone"></i> 
<input type="text" class="form-control" placeholder="Your phone"> 
</div>


<div class="form-group"> 
<button type="submit" class="btn btn-lg btn-primary">Request a call</button> 
</div>

</form>

read more...