Skip to content

Instantly share code, notes, and snippets.

@kdarty
Created June 13, 2016 18:03
Show Gist options
  • Save kdarty/f7099e16704c8337d759b36412d41d4d to your computer and use it in GitHub Desktop.
Save kdarty/f7099e16704c8337d759b36412d41d4d to your computer and use it in GitHub Desktop.
Make input value uppercase in CSS without affecting the placeholder Taken from Stackoverflow: http://stackoverflow.com/questions/25180140/make-input-value-uppercase-in-css-without-affecting-the-placeholder JSBin Demo: http://jsbin.com/gubef/1/edit?html,css,output
input {
text-transform: uppercase;
}
::-webkit-input-placeholder { /* WebKit browsers */
text-transform: none;
}
:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
text-transform: none;
}
::-moz-placeholder { /* Mozilla Firefox 19+ */
text-transform: none;
}
:-ms-input-placeholder { /* Internet Explorer 10+ */
text-transform: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment