Results 1 to 4 of 4

Thread: Resize page to suit resolution?

  1. #1

    Thread Starter
    Frenzied Member Jmacp's Avatar
    Join Date
    Jul 2003
    Location
    UK
    Posts
    1,959

    Resize page to suit resolution?

    How do i keep the page the same size relative to the user resolution used. For example when i am creating my page in 1024x768 then the margins are quite far from the edge whereas if i switch to 800x600 then the margins reduce(page is much fatter) ....?

    I think it may be my css that's restricting the page from resizing automatically, will this be right? Is it because i am working in px and not percentages?

    The first pic is 1024x768 second pic is at 800x600




  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Resize page to suit resolution?

    The ideal solution would be to use percentages so that your page 'flows' with the size of the browser (and so the resolution becomes irrelevant). I'm guessing that the central column has a fixed width, which means that if you go below 800*600, you should get a horizontal scrollbar.

  3. #3
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Resize page to suit resolution?

    Quote Originally Posted by mendhak
    The ideal solution would be to use percentages so that your page 'flows' with the size of the browser (and so the resolution becomes irrelevant).
    That's what I a lot of people seem to do when creaing websites. However, some people might want you to use the actual height and width.

    Example:

    Code:
    height: 768px;
    width: 1024px;
    Pity there is no solution for solving both problems.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  4. #4
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Resize page to suit resolution?

    If you want constant margins then use width:auto and an explicit margin value.

    Code:
    html { margin: 0; padding: 0; }
    body { margin: 0 100px; }

Posting Permissions

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



Click Here to Expand Forum to Full Width