Results 1 to 4 of 4

Thread: Code to fit web page to monitor size

  1. #1
    Join Date
    May 2009
    Posts
    136

    Code to fit web page to monitor size

    I'm running Windows Xp as my operating system. There are many web sites which look differently when i try to view them by using wide screen monitor rather than going for normal standard screen. Is there any way that a webpage can be made smaller or larger for the setting on the user's monitor? Or is there any kind of code to fit web page to monitor size? Does any body knows about it? Kindly provide me the correct solution for the above issue.

  2. #2
    Join Date
    Dec 2007
    Posts
    1,599

    Re: Code to fit web page to monitor size

    In order to adjust the page size of your monitor screen, you need to use the following CSS code:
    body{width:100%;}
    With this code the page will take 100% of the window, regardless of its size.

    Note:- You must define a width in%, and no other unit, because the% calculated as a percentage relative to the width of the window as opposed to other units which correspond to heights of line (a predefined size ).

  3. #3
    Join Date
    Jun 2006
    Posts
    623

    Re: Code to fit web page to monitor size

    According to me, i think most of the web pages these days uses a naitive resolution of 1024X768. If your screen resolution is been set to 800X600, then this will be why the web pages don't fit your screen. You need to change your resolution to 1024X768.

  4. #4
    Join Date
    Jan 2008
    Posts
    644

    Re: Code to fit web page to monitor size

    I don't think its actually possible with just HTML, but i know that you can do it with the help of javascript. A common way to handle it, is to assume that the monitor is at least 800 pixels wide, and that anyone with such low resolution has the browser maximized, so that you can safely use about 780 pixels without needing to scroll horizontally. The space to the right of that with is usually used for secondary material, like ads. Another way to handle it is to use the full width of the browser window, and let the content adjust itself, for example using floating elements.

Similar Threads

  1. IN firefox How do I increase the size of a page
    By J@Y in forum Technology & Internet
    Replies: 3
    Last Post: 30-11-2011, 04:26 PM
  2. Page File Size on 64-bit server
    By Jaiwanti in forum Networking & Security
    Replies: 3
    Last Post: 28-07-2009, 10:08 AM
  3. How can I define font size in PHP page?
    By RedIndigo in forum Software Development
    Replies: 3
    Last Post: 10-07-2009, 11:40 PM
  4. How to download all the images on a page to its actual size
    By Connect_Me in forum Technology & Internet
    Replies: 3
    Last Post: 12-05-2009, 02:16 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,559,097.72720 seconds with 17 queries