"Search input with buttons and icons inside and next"
Bootstrap 3.3.0 Snippet by vsantiago113sec@gmail.com

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<div class="container">
<div class="row m-t-50">
<h1 class="text-center">Bootstrap Search button next to input</h1>
<div class="col-xs-12 col-sm-8 col-sm-offset-2 col-md-6 col-md-offset-3 col-lg-6 col-lg-offset-3">
<form role="Form" action="" method="POST" charset="UTF-8">
<div class="form-group">
<div class="input-group">
<input class="form-control" type="text" name="search" placeholder="Search..." required/>
<span class="input-group-btn">
<button class="btn btn-success" type="submit"><span class="glyphicon glyphicon-search" aria-hidden="true"></span>Search</button>
</span>
</div>
</div>
</form>
</div>
</div>
<div class="row m-t-30">
<h1 class="text-center">Search with icon inside input left</h1>
<div class="col-xs-12 col-sm-8 col-sm-offset-2 col-md-6 col-md-offset-3 col-lg-6 col-lg-offset-3">
<form role="Form" action="" method="POST" charset="UTF-8">
<div class="input-search">
<span class="glyphicon glyphicon-search" aria-hidden="true"></span>
<input type="text" name="search" placeholder="Search..." class="form-control input-box">
</div>
</form>
</div>
</div>
<div class="row m-t-30">
<h1 class="text-center">Search with icon inside input right</h1>
<div class="col-xs-12 col-sm-8 col-sm-offset-2 col-md-6 col-md-offset-3 col-lg-6 col-lg-offset-3">
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* GENERAL CSS */
.m-t-30 {
margin-top: 30px;
}
.m-t-50 {
margin-top: 50px;
}
.m-b-50 {
margin-bottom: 50px;
}
/* END GENERAL CSS */
/* EXAMPLE 1 */
.glyphicon-search {
margin-right: 5px;
}
/* END EXAMPLE 1 */
/* EXAMPLE 2 */
.input-search {
position: relative;
}
.input-search input {
padding-left: 40px;
}
.input-search span {
font-size: 20px;
position: absolute;
top: 8px;
left: 8px;
color: #ccc;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: