"Table With Toggle Switch"
Bootstrap 3.3.0 Snippet by Walia5

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">
<div class="row" style="margin-top: 50px;">
<div class="col-md-12 text-center">
<div class="outer-form">
<table class="table-striped table table-bordered vertical">
<thead style="color: white; font-weight: normal; background-color: black;" >
<tr>
<th class="head">S.No.</th>
<th class="head">Username</th>
<th class="head">E-mail</th>
<th class="head">Phone Number</th>
<th class="head">Location</th>
<th class="head">Status</th>
</tr>
</thead>
<tbody style="border:1px solid transparent; background-color:#242424; color:#A1A6AB; text-align: left;">
<tr>
<td style="padding: 14px;">01</td>
<td>WaLia</td>
<td>Walia@gmail.com</td>
<td>+1 222 555 6666</td>
<td>Ontario, Canada</td>
<td>
<label class="switch">
<input type="checkbox" checked>
<span class="slider round"></span>
</label>
</td>
</tr>
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
body {
background-color:#393939;
}
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
padding: 8px;
line-height: 1.42857143;
vertical-align: middle;
border-top: 1px solid #ddd;
}
.switch {
position: relative;
display: inline-block;
width: 45px;
height: 20px;
vertical-align: middle;
margin-top: 8px;
}
.switch input {display:none;}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #A1A6AB;
-webkit-transition: .4s;
transition: .4s;
}
.slider:before {
position: absolute;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: