"Slider search box"
Bootstrap 3.1.0 Snippet by bububu

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<div class="container">
<div class="row">
<h2>Slider Search box</h2>
<div class="search">
<input type="text" class="form-control input-sm" maxlength="64" placeholder="Search" />
<button type="submit" class="btn btn-primary btn-sm">Search</button>
</div>
</div>
</div>
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
#search {
float: right;
margin-top: 9px;
width: 250px;
}
.search {
padding: 5px 0;
width: 230px;
height: 30px;
position: relative;
left: 10px;
float: left;
line-height: 22px;
}
.search input {
position: absolute;
width: 0px;
float: Left;
margin-left: 210px;
-webkit-transition: all 0.7s ease-in-out;
-moz-transition: all 0.7s ease-in-out;
-o-transition: all 0.7s ease-in-out;
transition: all 0.7s ease-in-out;
height: 30px;
line-height: 18px;
padding: 0 2px 0 2px;
border-radius:1px;
}
.search:hover input, .search input:focus {
width: 200px;
margin-left: 0px;
}
.btn {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments:

How can i change the color of the button te be yellow #FFFF00 and align center the button.

mamkha () - 8 years ago - Reply 0


is it possible to change the slide from left to right?
if yes, what should i do?

acsyaifullah () - 8 years ago - Reply 0


i want the background orange
what should i do?

refat () - 8 years ago - Reply 0


do u want search field background orange ?
In CSS code , add this { background-color: orange; } (without curly braces) in .search input selector which starts on line 19.

Hasnain () - 8 years ago - Reply 0