Web Design, Auto Resize

w0lv3rin3

The Source
Political Access
Joined
18 Mar 2004
Messages
465
whats the code so that when some1 goes it my page it will dected their res and auto resize their page so it fits!
 
that works to some extend, but then the text looks out of proportion...i'll find you the code that redirects to a different file depending on res.(so you can ake an 8x6 page and a 10x7 page) but thats about all i can do 4 ya
 
make different style sheets for the different proportions then make a script like this
Code:
<script type="text/javascript"> 
var highres = "High resolution style sheet";
var lowres = "low resolution style sheet";
function high()
	{
	document.write('<link rel="stylesheet" type="text/css" href="css' + highres + '.css">'');
	}
function low()
	{
	document.write('<link rel="stylesheet" type="text/css" href="css' + lowres + '.css">'');
	}

var screen = (screen.width<1024) ? low() : high();
</script>
That should work if you load it in your <head> section... i just made it though and havent tested it
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,623
Latest member
AndersonLo
Back