"Stylish File Input Button"
Bootstrap 3.3.0 Snippet by zahedkamal87

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="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<div class="container text-center">
<div class="row">
<h2 class="text-center" >Bootstrap Style Pure CSS File Input Button</h2>
<hr style="margin-bottom:25px;" />
<div class="col-sm-12" style="margin-bottom:20px;">
<label class="btn-bs-file btn btn-lg btn-primary">
Browse
<input type="file" />
</label>
<label class="btn-bs-file btn btn-lg btn-success">
Browse
<input type="file" />
</label>
<label class="btn-bs-file btn btn-lg btn-info">
Browse
<input type="file" />
</label>
<label class="btn-bs-file btn btn-lg btn-warning">
Browse
<input type="file" />
</label>
<label class="btn-bs-file btn btn-lg btn-danger">
Browse
<input type="file" />
</label>
</div>
<div class="col-sm-12" style="margin-bottom:20px;">
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
.btn-bs-file{
position:relative;
}
.btn-bs-file input[type="file"]{
position: absolute;
top: -9999999;
filter: alpha(opacity=0);
opacity: 0;
width:0;
height:0;
outline: none;
cursor: inherit;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: