PDA

View Full Version : Positioning Issues + Browser Sizes



ranteo
20 Oct 2007, 04:35 PM
Hi. I'm wondering if anybody can aid me on changing positions for various browser sizes. What I'm hoping to do is that for my particular element, I want it to be at 15% from left, and 10% from top, for 800 X 600, at 20% from left, and 15% from top for 1024 X 768 etc etc.

Thanks!

Wickham
21 Oct 2007, 02:17 AM
You need to use a javascript sniffer to find the screen resolution and then use different stylesheets for the different resolutions.

Google: screen resolution detection javascript.

This is one link I looked at:-
http://www.pageresource.com/jscript/jscreen.htm

The example sends the viewer a different html PAGE if he has a small or large screen resolution but different code can also divert to a different stylesheet from the same page.

Ask on the javascript board how to code it properly.

Remember that it will tell you what screen resolution a viewer's browser is set at but not what window size he is using. He may have a screen resolution of 1280*1024 but always use a smaller window. People with 1600*1200 resolutions often split their screens vertically into two 800px wide windows.