Styling Checkboxes with Consistent Look in CSS


Create a consistent look for checkboxes across different browsers.

Source Code

.checkbox {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: white;
    border: 2px solid currentColor;
    border-radius: 4px;
}
.checkbox:checked {
    background: currentColor;
}
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments