Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Double-sized checkbox in Chrome

All browsers except Chrome do display this style:

.my-checkbox {
    width: 20px;
    height:20px;
    color:#fff;
    -moz-appearance:none;
    -webkit-appearance:none;
    -o-appearance:none;
    border: 0px inset ThreeDFace ! important;
    margin: 5px;
    padding: 5px;
}

Example: http://jsfiddle.net/sJxst/

is this approach possible in Chrome?

like image 997
Vladimir Kishlaly Avatar asked Dec 26 '12 07:12

Vladimir Kishlaly


1 Answers

There is a jquery plugin for this.. i don't know any other method yet for Chrome

http://archive.plugins.jquery.com/project/ui-checkbox

Also check this:

input.checkbox { display: none }
input.checkbox + label > span.checkbox-span { display: inline-block; color: #FFF; border: 1px solid #000; width: 30px; line-height: 30px; font-size: 24px; text-align: center }
input.checkbox:checked + label > span.checkbox-span { color: #000 }

http://jsfiddle.net/KfjuS/4/

like image 200
user1713941 Avatar answered Nov 14 '22 19:11

user1713941