Web Design, Auto Resize

w0lv3rin3

The Source
Political User
#1
whats the code so that when some1 goes it my page it will dected their res and auto resize their page so it fits!
 
K

Kw4ntuM

Guest
#2
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
 

xsk8zerox

OSNN Senior Addict
#3
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 posts

Latest profile posts

Perris Calderon wrote on Electronic Punk's profile.
Ep, glad to see you come back and tidy up...did want to ask a one day favor, I want to enhance my resume , was hoping you could make me administrator for a day, if so, take me right off since I won't be here to do anything, and don't know the slightest about the board, but it would be nice putting "served administrator osnn", if can do, THANKS

Been running around Quora lately, luv it there https://tinyurl.com/ycpxl
Electronic Punk wrote on Perris Calderon's profile.
All good still mate?
Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,969
Messages
673,295
Members
89,015
Latest member
arrangel