mardi 21 novembre 2017

Checkbox styling doesn't work on Safari mobile

I want to style the checkboxes like the following:

enter image description here

This is my CSS:

.checkboxcontact input[type="checkbox"] {
    -webkit-appearance: none;
    background-color: white;
    border: 1px solid #d44803;
    padding: 9px;
    border-radius: 3px;
    display: inline-block;
    position: relative;
    float:left;
}

.checkboxcontact input[type="checkbox"]:checked {
    background-color: #d44803;
    border: 1px solid white;
    color: #fff;
}

.checkboxcontact input[type="checkbox"]:checked:after {
    content: '\2714';
    font-size: 14px;
    position: absolute;
    top: 0;
    left: 3px;
    color: #fff;
    font-family: "FontAwesome";
}

This shows perfect on desktop and Chrome on mobile phones.

enter image description here

But the problem is with Safari on iPhone. It shows like this:

enter image description here

How can I fix this? Is there a fallback or something?




Aucun commentaire:

Enregistrer un commentaire