Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GideonBabu/e99b3ded109b01180a90f48003c5c204 to your computer and use it in GitHub Desktop.
Save GideonBabu/e99b3ded109b01180a90f48003c5c204 to your computer and use it in GitHub Desktop.
css: iPhone - Disable auto-zoom on input fields
/*
* disable auto-zoom on iphone input field focus
* http://www.456bereastreet.com/archive/201212/ios_webkit_browsers_and_auto-zooming_form_controls/
*/
input[type='text']:focus,
input[type='number']:focus,
textarea:focus {
font-size: 16px;
}
/* disable auto-zoom on iphone input field focus */
@media screen and (-webkit-min-device-pixel-ratio:0) {
select:focus,
textarea:focus,
input:focus {
font-size: 16px;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment