Is it possible to change the background color of a div when a radio button is checked? I want the selected radio button to make the whole div appear as if it is selected.
If the radio button inside .pricing-option.one is checked, then .pricing-option.one should change its background color. The same rule applies for .pricing-option.two and all others.
This is what I am trying to achieve:
https://i.sstatic.net/jvdHa.png
I need help understanding how to implement this. Can anyone provide assistance?
This is the relevant code snippet:
<div class="visible-xs mobile-pricing-table clearfix">
<div class="col-xs-4 pricing-option one text-center">
<div class="ticket-quantity">
<h2>50</h2>
<p>Lottery Tickets</p>
</div>
<div class="winning-chances">
<h2>17%</h2>
<p>Winning Chances</p>
</div>
<div class="price">
<strike>€114.99</strike>
<h2>€14.99</h2>
<p>You save 100€</p>
</div>
<div class="offer-selection">
<input type="radio" name="optionsRadios" id="optionsRadios4" value="option4">
<label for="optionsRadios4"></label>
</div>
</div>
<div class="col-xs-4 pricing-option two text-center">
<div class="ticket-quantity">
<h2>200</h2>
<p>Lottery Tickets</p>
</div>
<div class="winning-chances">
<h2>68%</h2>
<p>Winning Chances</p>
</div>
<div class="price">
<strike>€126.40</strike>
<h2>€26.40</h2>
<p>You save 100€</p>
</div>
<div class="offer-selection">
<input type="radio" name="optionsRadios" id="optionsRadios5" value="option5">
<label for="optionsRadios5"></label>
</div>
</div>
<div class="col-xs-4 pricing-option three text-center">
<div class="ticket-quantity">
<h2>400</h2>
<p>Lottery Tickets</p>
</div>
<div class="winning-chances">
<h2>87%</h2>
<p>Winning Chances</p>
</div>
<div class="price">
<strike>€149.9</strike>
<h2>€49.9</h2>
<p>You save 100€</p>
</div>
<div class="offer-selection">
<input type="radio" name="optionsRadios" id="optionsRadios6" value="option6">
<label for="optionsRadios6"></label>
</div>
</div>
</div>