I have various form
elements on my page, but am having an issue with input radio buttons in Firefox. The radio buttons display perfectly in Safari and Chrome, but are entirely different in Firefox (circular instead of square!) and are :checked by default, which is also an issue.
From my research, the use of -moz-appearance is widely recommended, but in this instance I can't find any answers that directly relate to my query. Any help would be greatly appreciated.
Markup
<form>
<label class="radio" for="#">One</label>
<input type="radio">
<label class="radio" for="#">Two</label>
<input type="radio">
</form>
CSS
input[type="radio"] {
-webkit-appearance: none; /* Remove default appearance styling for Webkit */
-moz-appearance: none; /* Remove default appearance styling for Firefox */
background: #ccc;
width: 45px;
height: 45px;
vertical-align: middle;
margin: 0 10px;
cursor: pointer;
}
input[type="radio"]:hover { background: #e4e4e4; }
input[type="radio"]:checked {
background: #000;
position: relative;
width: 45px;
height: 45px;
}
input[type="radio"]:checked:after {
content: '';
position: absolute;
width: 20px;
height: 8px;
background: transparent;
top: 15px;
left: 10px;
border: 1px solid #fff;
border-top: none;
border-right: none;
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
transform: rotate(-45deg);
}
JSFiddle
Please view the above fiddle in Firefox and Chrome to see the issues I am referring to. Thanks.