Skip to content

Instantly share code, notes, and snippets.

Created May 3, 2012 17:51
Show Gist options
  • Save anonymous/2587576 to your computer and use it in GitHub Desktop.
Save anonymous/2587576 to your computer and use it in GitHub Desktop.
Weirdness when using "size" and HTML5 number input
/**
* Weirdness when using "size" and HTML5 number input
*/
input {
display: block
}
<h1>input type=text</h1>
<input type=text size=2>
<input type=text size=20>
<input type=text size=40>
<p>Notice how the "size" attribute works?
<hr>
<h1>input type=number</h1>
<input type=number size=2>
<input type=number size=20>
<input type=number size=40>
<p>Notice how the "size" attribute is now ignored?
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment