$2.26

How to disable zoom on a mobile web page?

Ask a question+
3

Please help me with this issue, I am creating a mobile web page which is a form with some text inputs.

When I click on some input the whole page zooms , obscuring the rest of the page. Is there a way to disable this kind of zoom on mobile web pages using HTML or CSS command?

Anna 90
add comment

1 Answer

2

Most of the mobile browsers require font-size in inputs to be 16px. Thus:

input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
input[type="password"] {
  font-size: 16px;
}

Here you can read the details:
https://www.w3docs.com/snippets/css/how-to-disable-zoom-on-a-mobile-web-page-using-html-and-css.html

Jane Moore 210
add comment

Your Answer