I need help customizing a toggle switch element in CSS. I want the first row to display as on (blue color) and the second and third rows to be displayed as off or grey.
So far, my attempts to modify the CSS code have been unsuccessful.
.switch {
position: relative;
display: inline-block;
width: 38px;
height: 22px;
}
.switch input {
display: none;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #98B3DD;
-webkit-transition: .4s;
transition: .4s;
}
.slider:before {
position: absolute;
content: "";
height: 16px;
width: 16px;
left: 3px;
bottom: 3px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
}
input:focus+.slider {
box-shadow: 0 0 1px rgb(221, 223, 235);
}
.slider.round {
border-radius: 34px;
}
.slider.round:before {
border-radius: 50%;
}
<ul class="list-group list-group-flush"></ul>
<div class="row">
<div class="col-xl-11">
<div class="table-responsive">
<table class="table">
<thead>
<tr></tr>
</thead>
<tbody>
<tr>
<td>Device 1</td>
<td><i class="far fa-edit fa-2x text-#98B3DD" style="font-size: 25px;height: 22px;margin-left: 2px;margin-right: 2px;"></i></td>
<td><i class="far fa-times-circle fa-2x text-#98B3DD" style="font-size: 25px;"></i></td>
<td><label class="switch"><input type="checkbox" /><span class="slider round"></span></label></td>
</tr>
<tr>
<td>Device 2</td>
<td><i class="far fa-edit fa-2x text-gray-300" style="font-size: 25px;height: 22px;margin-left: 2px;margin-right: 2px;"></i></td>
<td><i class="far fa-times-circle fa-2x text-gray-300" style="font-size: 25px;"></i></td>
<td><label class="switch"><input type="checkbox" /><span class="slider round"></span></label></td>
</tr>
<tr>
<td>Device 3</td>
<td><i class="far fa-edit fa-2x text-gray-300" style="font-size: 25px;height: 22px;margin-left: 2px;margin-right: 2px;"></i></td>
<td><i class="far fa-times-circle fa-2x text-gray-300" style="font-size: 25px;"></i></td>
<td><label class="switch"><input type="checkbox" /><span class="slider round"></span></label></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="row">
<div class="col-xl-11">
<div><button type="button" class="btn btn-primary" data-toggle="collapse" data-target="#addnewdevice">Add New Device</button>
<div class="collapse" id="addnewdevice">