Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 6th, 2012  |  syntax: None  |  size: 0.47 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How to make a website look the same in all browsers and all resolutions?
  2. function autoscale()
  3.   {
  4.   var screenwidth=screen.width;
  5.   var fontsize = screenwidth * 0.0117249;
  6.   /* This number 0.0117249 just happens to work perfectly */
  7.   var fonttext = fontsize + '';
  8.     fontsize = fonttext + 'pt';
  9.     document.body.style.fontSize = fontsize;
  10.     document.body.style.visibility='visible';
  11.     document.body.style.zoom = '100%';
  12.     document.body.style.fontSize = "1em";
  13.   }