dimanche 20 octobre 2019

How to style a checkbox when it is nested within an input

Unlike the normal method of styling .... I have a Wordpress plugin that nests the input checkbox with the label.

I'm 90% sure that I can't do this with CSS alone due to the parent-child relationship and I have tried and failed in that regard. Markup I have is:

<label class="bundled_product_optional_checkbox">
<input class="bundled_product_checkbox" type="checkbox" name="bundle_selected_optional_1" value=""> 
Add for <span class="price"><span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">£</span>30.00</span>
<small class="woocommerce-price-suffix">ex. VAT</small></span></label>

I'd like a custom image for the checkmark and on checked. Do I need to do this in CSS + js?




Aucun commentaire:

Enregistrer un commentaire