Tom Hartland
  • Blog
  • Photos

Override Default Mobile Font Size

How to stop mobiles chosing their own font size in HTML

After spending several hours trying to figure out why mobiles (iOS in particular) would display particular lines of text at a completely different text size than desired, it turns out that they try and do it to be helpful.

To override the default operation, use the following CSS...

html, body {
    -ms-text-size-adjust: none;
    -moz-text-size-adjust: none;
    -o-text-size-adjust: none;
    -webkit-text-size-adjust: none;
}
Added 02/03/2020 15:06
  • 2024
    • October
      • Align SQL Login to User
    • May
      • SQL XML Ordering
  • 2023
    • December
      • Chrome Self-Signed SSL HSTS
    • May
      • String Template Format
    • February
      • Convert List<object> to List<int>
      • URI encoding in Javascript
      • Merging jQuery objects
  • 2022
    • May
      • Listing XML nodes in XSLT
      • XML node value in TSQL
      • Class-less JSON (Newtonsoft)
  • 2021
    • April
      • Variables in TSQL XML
  • 2020
    • March
      • Override Default Mobile Font Size
    • January
      • DNS Info Via Command Line
  • 2019
    • May
      • Restore USB Stick Full Capacity
    • April
      • Removing Entire Unix Directory
    • January
      • Handling 404 Errors in Development
  • 2018
    • November
      • Generating Row Numbers in SQL
    • September
      • Show/Hide via Checkbox and CSS
    • August
      • Javascript Nested Loop Break
    • July
      • CSS "nth-child" Processing
    • June
      • Client-Side Script After UpdatePanel Refresh
      • UpdatePanel Button Click via Javascript
      • ASP.NET Fire Validation
    • April
      • SQL Server CSV From Data
      • SQL Server Dynamic Script Permissions
    • March
      • Purpose of this blog
© 2025 Tom Hartland. All Rights Reserved