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
http://i40.tinypic.com/2a9o5ls.jpg
http://i44.tinypic.com/ambqmu.jpg
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.
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. :rolleyes:
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; }