How to prevent text size increase in html / css

this website looks very nice, although it managed to prevent the browser from increasing / decreasing the font size.

http://simplegeo.com/

If you checked the Scale only text option in your browser and try to zoom in or out (usually ⌘ + / ⌘- or ctrl + / ctrl -) , you can see that the font size does not change.

How can I reproduce the same effect?

I think it would be nice to prevent items from the menu or purely layout-based items and leave only the main text.

+4
source share
2 answers

From a look at their CSS, it could be this line of code: -webkit-text-size-adjust:none; If so, it will only work in a limited number of browsers, and not everywhere.

There are not many reasons why you should stop users from resizing text. Yes, this can cause design problems, but you can also argue that the design must be flexible enough to deal with changes in font size.

Comedy Option: Replace all text with images.

+8
source

Use the following CSS.

 <style type="text/css"> -webkit-text-size-adjust:none; -ms-text-size-adjust:none; -moz-text-size-adjust:none; text-size-adjust:none; </style> 
+4
source

All Articles