Home
NOTE: I'm in the middle of upgrading the site. Most things are in place, but some things are missing and/or broken. This includes alt text for images. Please bear with me while I get things fixed.

Set The Size Of An HTML Input Number Field

I'm using this to set the size of number input fields.

.number_inputs {
  width: 3ch;
}

Details

Chrome is automatically sizing form input number fields for me if I put both min and max attributes on them. Firefox is not.

The size attribute also doesn't work. Instead I'm using the above CSS to set the size using the ch unit which is the width "O" character for the font.

~ fin ~

References