SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2002
    0 Post(s)
    0 Thread(s)

    web site window size

    is there a script that I can use to detect a visitors screen size and adjust my web site to fit that screen, also I want my pages to fully print to the width of the paper instead of missing some of the words off the end of sentences, any help out there????

  2. #2
    American't awestmoreland's Avatar
    Join Date
    Sep 2002
    Grand Rapids, MI
    0 Post(s)
    0 Thread(s)
    Do you mean screen size or browser window size?
    As you can see from the links, it's relatively easy to get this information, unfortunately it's not quite as easy to get your web page looking luvverly in all sizes.

    The best way to ensure that your site resizes accordingly, is to make all sizes percentages rather than fixed width
    i.e. <table width="100%"> rather than <table width="500px">

    That won't solve all problems and you'll have to experiment with it in different resolutions to make sure that it looks OK, but it's a good start.

    Printing's a different issue:
    I suspect that you should simply make sure that your pages are of a width that would fit on most printers. I don't know what that arbitrary value is. If you use CSS, then you can format your pages for printing but you'll still need to guess how wide to make them I'd imagine.

    From the English nation to a US location.


Posting Permissions

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