Skip to content

Instantly share code, notes, and snippets.

@vedranjaic
Created May 26, 2013 17:40
Show Gist options
  • Select an option

  • Save vedranjaic/5653472 to your computer and use it in GitHub Desktop.

Select an option

Save vedranjaic/5653472 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;
}
}
@waybuu

waybuu commented Sep 28, 2018

Copy link
Copy Markdown

Thank you! This just solved my big headache!!! Thumbs up to you!

@maxflex

maxflex commented Aug 26, 2019

Copy link
Copy Markdown

Doesn't help :(

@paingthor

Copy link
Copy Markdown

@deepakkumartiwari

Copy link
Copy Markdown

@maxflex

Doesn't help :(

Please add "!important" then it will be works for you to. If doesn't work then please let me your browser version as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment