
Untitled
By: a guest on
Jul 6th, 2012 | syntax:
None | size: 0.47 KB | hits: 14 | expires: Never
How to make a website look the same in all browsers and all resolutions?
function autoscale()
{
var screenwidth=screen.width;
var fontsize = screenwidth * 0.0117249;
/* This number 0.0117249 just happens to work perfectly */
var fonttext = fontsize + '';
fontsize = fonttext + 'pt';
document.body.style.fontSize = fontsize;
document.body.style.visibility='visible';
document.body.style.zoom = '100%';
document.body.style.fontSize = "1em";
}