Results 1 to 4 of 4

Thread: changing website resolution

  1. #1
    Senior Member
    Join Date
    May 2002
    Posts
    147

    changing website resolution

    Is it possible to display a certain website depending on a person's screen resolution?

    i.e.
    If person's resolution = 640x480 go to this link
    otherwise go to this link
    Mama always said, keep your virus definitions up to date.

  2. #2
    AO French Antique News Whore
    Join Date
    Aug 2001
    Posts
    2,126
    yes! It's possible if you're using table with width="100%"
    PHP Code:
    <table width="100%">
    &
    lt;tr>
    &
    lt;td width="20%"></td>
    &
    lt;td width="80%"></td>
    &
    lt;/tr>
    &
    lt;/table&gt
    This will make a table that take 100% of the screen users with 2 colums. First one will take 20% of the screen size and the other 80%.

    You can also do this

    <table width="100%">
    <tr>
    <td width="200"></td>
    <td width=*></td>
    </tr>
    </table>
    [/PHP]

    First colums will take 200 pixels and the second, the rest of the screen.
    -Simon \"SDK\"

  3. #3
    Webius Designerous Indiginous
    Join Date
    Mar 2002
    Location
    South Florida
    Posts
    1,123
    You could also use javascript to detect resolutions. This works in Netscape 4 and higher, and IE5 and higher.

    <script language="javascript">
    <!--
    if ((screen.width>=1024) && (screen.height>=768))
    {
    window.location="1024x768.html";
    }
    else
    {
    window.location="lowerresolution.html";
    }
    //-->
    </script>

    This will allow you to create high resolution designs without having to worry about scrolbars for people with 800x600 or lower.


    cheers

  4. #4
    Senior Member
    Join Date
    May 2002
    Posts
    147
    i'd thought about using javascript but wasn't sure how to do it, thanks.
    Mama always said, keep your virus definitions up to date.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •