Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to change the style of radio button in FireFox?

I try to change the radio button, I try the following line. My style apples in All browsers but Firefox. In fact, I don’t see the style in Firefox.

#payment_method_paypal[type='radio']::after {
    width: 20px !important;
    height: 20px !important;
    border-radius: 3px;
    top: -6px !important;
    left: -1px !important;
    position: relative;
    background-color: #fff !important;
    content: '';
    display: inline-block;
    visibility: visible;
    border: 2px solid #776330 !important;
}

#payment_method_paypal[type='radio']:checked::after {
    width: 20px !important;
    height: 20px !important;
    border-radius: 3px;
    top: -6px !important;
    left: -1px !important;
    position: relative;
    background-color: #776330 !important;
    content: '';
    display: inline-block;
    visibility: visible;
    border: 2px solid #776330 !important;
    box-shadow: inset 0 0 0 2px #fff !important;
    margin-left: 6px;
}


#payment_method_stripe[type='radio']::after {
    width: 20px !important;
    height: 20px !important;
    border-radius: 3px;
    top: -6px !important;
    left: -1px !important;
    position: relative;
    background-color: #fff !important;
    content: '';
    display: inline-block;
    visibility: visible;
    border: 2px solid #776330 !important;
}

#payment_method_stripe[type='radio']:checked::after {
    width: 20px !important;
    height: 20px !important;
    border-radius: 3px;
    top: -6px !important;
    left: -1px !important;
    position: relative;
    background-color: #776330 !important;
    content: '';
    display: inline-block;
    visibility: visible;
    border: 2px solid #776330 !important;
    box-shadow: inset 0 0 0 2px #fff !important;
    margin-left: 6px;
}
<input id="payment_method_stripe" type="radio" class="input-radio" name="payment_method" value="stripe" checked="checked" data-order_button_text="">
<label for="payment_method_stripe">Credit / Debit Card</label>

<input id="payment_method_paypal" type="radio" class="input-radio" name="payment_method" value="paypal" data-order_button_text="Proceed to PayPal">
<label for="payment_method_paypal">PayPal</label>

JSFiddle link

How to apply this style in firefox?
What is the problem that cause not showing in Firefox?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

I have already tried the following solution:

Styling radio button – not work in IE and Firefox
How to change style of radio and checkbox input

>Solution :

I like Sato’s answer, but you could also add this to your CSS:

input[type='radio'] {
  -moz-appearance: initial !important;
}

I’d try to avoid using !important in your CSS, it’s not a good practice to use. I think if you remove it from your code, you could probably remove it from my snippet.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading