It looks like you're using an Ad Blocker.

Please white-list or disable AboveTopSecret.com in your ad-blocking tool.

Thank you.

 

Some features of ATS will be disabled while you continue to use an ad-blocker.

 

How do I make my site(s) auto adust to browers resolution?

page: 1
0

log in

join
share:

posted on Mar, 23 2006 @ 09:11 PM
link   
Howdy all,



I am a rookie with a complex (complex to me) problem: I need (want) my web sites to auto detect users resolution and adjust. I know its done all the time and possible, but how can a novice add this to their sites?

I am guessing its a Java script.

Can anybody help me? Im not just looking for a "yes is can be done", I am looking for a resource that can walk me through it.

Thanks in advance for your help!



posted on Mar, 23 2006 @ 09:30 PM
link   
How about an easy method? Sure, I could go into Javascript detection, page routing, or even CSS methods...but a really easy method is in using a simple table.

I don't know your plan, but I'll run through 2 examples.

1) You have a table at the top of the page with a blue graphic with a logo. Just add the property width=100% to the table and add a background color that is the same as the blue graphic. No matter the size of the browser window, it will expand to fill the screen and show a blue bar all the way across (don't forget to set the page margins to zero in the body tag and left or right justify the logo).

2) Now the layout table. Say it's 3 columns...left, middle, and right. I would make the left and right fixed size, like 200px for navigation and advertising respectively. Then set the table to width=100% and the middle column (the page text) will size to full width no matter what browser is looking at it.

Depending how complex the items are you plan to have in the middle, it will work. It does take some tweaking depending on the plan, but I think if you want an easy method...it should work.




posted on Mar, 23 2006 @ 09:49 PM
link   
This guy is good:

www.xs4all.nl...

ê¿ê



posted on Mar, 24 2006 @ 05:29 AM
link   
The method describe by ZZZ is by far the best method, since you don't need to have multiple version of your site. (It's often call the "liquid table" method.)

If you want to do it the other way, you want to google:
"screen resolution sniffer + CSS" or "screen resolution sniffer + _javascript" .
Sniffer is the keyword here. Personaly I would go with ZZZ's method. (or the .htaccess method would be good too, if your server allow that.)



posted on Mar, 24 2006 @ 01:54 PM
link   
Thanks guys! Ill have to tinker a bit.



new topics

top topics
 
0

log in

join