Resolution Independent Layout - Home

F.A.Q. (Frequently Asked Questions)

 

Q: What does this javascript do?
R: It "zooms" a web page according to the screen resolution. You can optimize your pages for a screen resolution (i.e. 800*600) and this script automatically will resize them if they will be viewed with an other resolution (i.e. 1024*768). See an example.


Q: How can I insert your code in my site?
R: It's very simple: download the javascript and insert the below code in all your html pages (except in the frameset):

<script type="text/javascript" src="resize.js"></script>
If the resize.js file is in a different directory than the html document, be sure to include the relative path to the Javascript file in the src attribute value.


Q: Which resolution must I use to do my sites?
R: You can choose what you want. I've set up my javascript for sites optimized for 800*600, but you can open the javascript and simply modify this value:
var correctwidth=800;


Q: Why doesn't this javascript work on my site?
R: If you have other javascripts, try to add this code to the body tag: onload="check_width".
The complete tag can become like this:
<BODY onLoad="MM_popupMsg('test\r');check_width()">


Q: Why don't flash movies work properly with your javascript?
R: Don't worry: you can get problems with flash movies in rare cases. I think that this is a bug of Internet Explorer.


Q: The images with text can lose quality when they are viewed on high resolution screen. What can I do?
R: You can use bigger gifs or jpegs without changing their width or height in the page (see the example below).

Images on 640*480
jpeg 76*50 pixel
jpeg 137*90 pixel

 

Images on 1024*768
jpeg 76*50 pixel
jpeg 137*90 pixel