I want to create a custom checkbox in HTML with CSS. When I am running this code in IE, it’s working properly, but when I try to run it in Google Chrome, it’s showing the default checkbox, not my custom one.
What modification do I need to run it in Chrome?
HTML
<link href="btn.css" rel="stylesheet" type="text/css" />
</head>
<body>
<input type="checkbox" class="check" />
</body>
CSS
.check {
width:81px;
height:78px;
border: 3px ridge;
border-color:red;
border-style:outset;
font:Verdana, Geneva, sans-serif;
font-style:italic;
font-size:16px;
font-weight:bold;
color:red;
}
That’s because IE supports CSS it shouldn’t support. Checkboxes can’t be edited a lot with CSS, Firefox and Chrome do it right… You could use a background image as a checkbox layout or just make your own with JS.