How to adjust page layout with varying screen res...

Soldato
Joined
11 Dec 2004
Posts
3,871
Hi all,

I am not very advanced with web design and I am throwing together a simple website to display my pictures, I have got the layout pretty much boxed off but what I want is to have a block colour background (shade of grey) and a white square that will be the placeholder for text and images.

How do I make the white box stay in the center of the screen for all users when they are on different screen resolutions?

So for example people on 800 x 600 will mainly see the white box and just a thin linke of grey down each side while users on 1280 x 1024 will still see the same sized white box positioned in the center with quite a lot of grey either side.

Hope you can help me out.

Cheers
 
In your CSS you need

#whiteBox
{
margin: 0 auto;
}

And then presumably in your HTML you have something along the lines of:

<div id="whitebox">whatever</div>

Have you tried searching for this on google? There's absolutely tons of stuff out there.
 
Back
Top Bottom