Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Different Chrome checkbox styles

I have the same version of Chrome 31 open for two sites, and one site has the checkbox on the right, and I checked the styles in the debugger but I can't seem to figure out what is causing it.

enter image description hereenter image description here

it must be a custom Chrome style applied since it's just using standard <input type="checkbox" />

this is the checkbox with a larger css width and height:

enter image description here

Both sites use <input type="checkbox">

like image 833
Timmerz Avatar asked Nov 20 '13 15:11

Timmerz


People also ask

Can I style checkbox in CSS?

By default, browsers have their own UI style, but you can use CSS to style the checkbox and create a unique look for your website or app.

How do I style a disabled checkbox?

You can't style a disabled checkbox directly because it's controlled by the browser / OS. However you can be clever and replace the checkbox with a label that simulates a checkbox using pure CSS. You need to have an adjacent label that you can use to style a new "pseudo checkbox".

How do I change the color of a checkbox?

Demonstrating checkbox checked red background color using CSS. Use the accent-color property to change the checkbox color in CSS.


2 Answers

I figured it out. The other site was zoomed slightly in Chrome. The CSS style to flip to the alternate rendering is...zoom.

zoom: 1.1

like image 73
Timmerz Avatar answered Sep 22 '22 16:09

Timmerz


It seems to be the case that the latest chrome and IE, im contrast to Firefox is able to scale checkboxes and radio buttons to the required width and height.

The following code will scale the radios and checkboxes to 50px x 50px large checkboxes.

input[type=radio], input[type=checkbox] {
    height: 50px; width: 50px;
}

Please compare the appearance in different browsers: https://jsfiddle.net/t9q0mny2/

like image 29
steven Avatar answered Sep 21 '22 16:09

steven