View Full Version : UPDATE: different rez, different css... one content page!
pixelmonkey
04-09-2001, 03:21 PM
i was throwing an idea around about 2 weeks ago of activating different pages, depending on what resolution the viewer had setup. This isnt too hard to accomplish with a javascript, but one problem was activating the content with a css that was set to look good with 1024 res. When the viewers went to the sigt with 480X640 they were all saying "Your website looks terrible!" the problem was related to the text being too large for the table layouts and images catching the res and adjusting accordingly. Here is the LoopHole!... start with the javasript for browser detection and re-direction on the root of your web. then upon re-direction activate the appropraite css, while accessing the content with an include on a base page that doesnt have set values for the text, background color, ect...
1 does 2, 2 does 3, and 3 does 1,2,4 & 5
chris<pixelmonkey>:monkey:
kevin
04-09-2001, 04:09 PM
You are a sick monkey.... but pretty darn smart and resourceful. I barely understand any of what you did but will never admit it in public...DOOH !! I guess I just did....
Sharpening the end a large bone with my new found alien knowledge....
Kevin
jonirvine
04-13-2001, 11:32 AM
What is the javascript for the screen res if you don't mind me asking Monkey?
Cheers.
jon
Cornelius7
04-28-2001, 04:10 PM
jon,
as far as I know, you need to call width and height independently (but I guess one kind of goes with the other, unless you have a two monitor setup):
window.screen.availWidth
window.screen.availHeight
these call the actual available width and height(your taskbar/startbutton for instance take up some of the actual screen-height).
window.screen.width
window.screen.height
they call the actual resolution (which may not all be available to your page though!).
In addition you can call:
window.screen.colorDepth
and actually retrieve the color depth which may come in handy if you want to desplay different graphics for users which only support 256 colors.
hope this helps.
Cornelius
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.