Web Design, Auto Resize

Discussion in 'Web Design & Coding' started by w0lv3rin3, Aug 8, 2002.

  1. w0lv3rin3

    w0lv3rin3 The Source Political User

    Messages:
    465
    Location:
    Barrie, ON
    whats the code so that when some1 goes it my page it will dected their res and auto resize their page so it fits!
     
  2. Kw4ntuM

    Kw4ntuM Guest

    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
     
  3. xsk8zerox

    xsk8zerox Moderator

    Messages:
    746
    Location:
    Philly
    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
     
  4. w0lv3rin3

    w0lv3rin3 The Source Political User

    Messages:
    465
    Location:
    Barrie, ON
    thx u
    `