Fix text rendered too large in Chrome on Android (as a developer)

by Jakub Marian

Tip: See my list of the Most Common Mistakes in English. It will teach you how to avoid mis­takes with com­mas, pre­pos­i­tions, ir­reg­u­lar verbs, and much more.

I have noticed a problem with text on this website being rendered much larger than it should in Chrome running on Android. For some obscure reason, Chrome decides to zoom in all text in boxes of a certain width which don’t have a specified maximal height. For example, my article about usage of dashes in English looked like this:

android-chrome1

Fortunately, there is a simple fix for the problem. As I have stated, the zoom is applied only to elements with no specified maximal height, so it suffices to add

style="max-height:999999px"

to the element containing the text. After I have done that, the text started to render in a normal way:

android-chromee

By the way, I have written several educational ebooks. If you get a copy, you can learn new things and support this website at the same time—why don’t you check them out?

0