I want to achieve HTML bars using radio buttons and also make their labels appear under x-axis. I also want to maintain the lock/unlock icons as shown in the code below. I have tried to look at these answers Creating interactive bar chart with only HTML and CSS and How to style a radio button to look like a regular Learn More Button But couldn't get the whole solution even after I tried. This is the code I have written and the expected results. When checked, the button color should change to green. I am using bootstrap. Someone assist me, please.
.team-bar {
/*list-style-type:none;
margin:25px 0 0 0;
padding:0; */
}
.team-bar .teama {
float: left;
margin: 0;
width: 150px;
height: 350px;
position:relative;
}
.team-bar .lock-unlock-img, .team-bar input {
display: block;
position:absolute;
top:0;
left:0;
right:0;
bottom:0;
}
.team-bar input[type="radio"] {
opacity:0.011;
z-index:100;
}
/*.team-bar .checked{
background:yellow;
}*/
.team-bar .lock-unlock-img {
padding:5px;
border:1px solid #CCC;
cursor:pointer;
z-index:90;
}
.team-bar .lock-unlock-img:hover {
background:#DDD;
}
<!-- Google Font: Source Sans Pro -->
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
<!-- Font Awesome -->
<link rel="stylesheet" href="//adminlte.io/themes/v3/plugins/fontawesome-free/css/all.min.css">
<!-- Theme style -->
<link rel="stylesheet" href="//adminlte.io/themes/v3/dist/css/adminlte.min.css">
<div class="container">
<div class="row">
<div class="team-bar">
<div class="col-md-1 center teama" style="display: inline !important;">
<div class="inner text-center">
<p class="radios" style="display: inline !important;">
<input id="radio" type="radio" class="radio-inline" value="" name="assetvalue">
<div class="lock-unlock-img">
<b class="float-left" alt="left"> <i class="fa fa-lock text-danger"></i></b>
<b class="float-right" alt="left"> <i class="fa fa-unlock text-success"></i></b>
</div>
<label class="radio bg-primary1 text-center" for="radio" style="display: inline-block !important;"> Team 1</label>
</p>
</div>
</div>
<div class="col-md-1 center teama" style="display: inline !important;">
<div class="inner text-center">
<p class="radios" style="display: inline !important;">
<input id="radio" type="radio" class="radio-inline" value="" name="assetvalue">
<div class="lock-unlock-img">
<b class="float-left" alt="left"> <i class="fa fa-lock text-danger"></i></b>
<b class="float-right" alt="left"> <i class="fa fa-unlock text-success"></i></b>
</div>
<label class="radio bg-primary1 text-center" for="radio" style="display: inline-block !important;"> Team 2</label>
</p>
</div>
</div>
<div class="col-md-1 center teama btn-success" style="display: inline !important;">
<div class="inner text-center">
<p class="radios" style="display: inline !important;">
<input id="radio" type="radio" class="radio-inline" value="" name="assetvalue">
<div class="lock-unlock-img">
<b class="float-left" alt="left"> <i class="fa fa-lock text-danger"></i></b>
<b class="float-right" alt="left"> <i class="fa fa-unlock text-success"></i></b>
</div>
<label class="radio bg-primary1 text-center" for="radio" style="display: inline-block !important;"> Team 3</label>
</p>
</div>
</div>
<div class="col-md-1 center teama" style="display: inline !important;">
<div class="inner text-center">
<p class="radios" style="display: inline !important;">
<input id="radio" type="radio" class="radio-inline" value="" name="assetvalue">
<div class="lock-unlock-img">
<b class="float-left" alt="left"> <i class="fa fa-lock text-danger"></i></b>
<b class="float-right" alt="left"> <i class="fa fa-unlock text-success"></i></b>
</div>
<label class="radio bg-primary1 text-center" for="radio" style="display: inline-block !important;"> Team 4</label>
</p>
</div>
</div>
<div class="col-md-1 center teama" style="display: inline !important;">
<div class="inner text-center">
<p class="radios" style="display: inline !important;">
<input id="radio" type="radio" class="radio-inline" value="" name="assetvalue">
<div class="lock-unlock-img">
<b class="float-left" alt="left"> <i class="fa fa-lock text-danger"></i></b>
<b class="float-right" alt="left"> <i class="fa fa-unlock text-success"></i></b>
</div>
<label class="radio bg-primary1 text-center" for="radio" style="display: inline-block !important;"> Team 5</label>
</p>
</div>
</div>
</div>
</div>
</div>