0

I'm building a bookmarklet that needs to have it's font sizes independent of the viewport or zoom level of the current page (when the javascript is injected).

What happens now (on tablets + phones mainly) is that the fonts are too small when the page fits the mobile viewport (or really small zoom levels on a PC browser).

Here's a screen grab:

http://i.stack.imgur.com/liO0C.png

Does anyone know a way to do this? Javascript or CSS solutions are great by me.

Thanks!

Sean

moskovich
  • 187
  • 1
  • 13

1 Answers1

1

Check This -

  1. Preserve HTML font-size when iPhone orientation changes from portrait to landscape

  2. Load mobile CSS if user is on Android

Even you can have Javasacript -

<script>        

if ((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) 
{

var t= '';       

document.write('<link href=http://..../.../your.css media=all rel=stylesheet type=text/css />');

}       

</script>

Tutorial Site :

http://css-tricks.com/snippets/javascript/redirect-mobile-devices/

http://www.gethifi.com/blog/three-ways-to-target-mobile-devices

Community
  • 1
  • 1