Centering a web page

liunx

Guest
Is it possible to centre an entire web page.<br />
<br />
I have a page which is desgined to fit onto 800 x 600 but when I display it on any resolution above this there is a lot of space to the right.<br />
<br />
The page uses a layout table to format the buttons, text, images etc.<br />
<br />
I know how to centre individual items in a page but want to whole page to appear centered no matter what the resolution.<br />
<br />
Cheers<br />
<br />
Z<!--content-->After your body tag, put a center tag.<br />
<br />
<center><!--content--><center> is deprecated, use this:<br />
<br />
<div style="width:100%;text-align:center;"><br />
&nbsp;<div style="margin:0px auto;"><br />
&nbsp;&nbsp;your content<br />
&nbsp;</div><br />
</div><br />
<br />
:D<br />
<br />
<br />
welcome to the forums by the way<!--content-->MD Hall, this is for you:#<br />
<br />
<!-- m --><a class="postlink" href="http://www.w3schools.com/html/html_reference.asp">http://www.w3schools.com/html/html_reference.asp</a><!-- m --><!--content-->Thanks Guys.<br />
<br />
Leoo24 - Worked a treat.<br />
<br />
And thanks for the welcome.<br />
<br />
I shall be using this forum more I think.<br />
<br />
Z<!--content-->Thnx joe2kiss...I've been trying to go in so many different directions with php, mysql and all that i've gotten off track with the html standards. I'll definitely go thru it. Know of a program thats Download <!--more-->able to run your scripts and check them for coding standards? Basically so you dont have to run them thru an online program.<!--content-->i dont think there is a Download <!--more-->able version of validation<br />
<br />
no problem mate, im learning HTML and im still forgetting about some of these tags lol<!--content-->you're welcome Z :)<br />
<br />
there are Download <!--more-->able validators, cse validator (<!-- m --><a class="postlink" href="http://www.webattack.com/get/cselite.html">http://www.webattack.com/get/cselite.html</a><!-- m -->) is quite a popular version (free), after you've finished your site andvalidated it with that just give it a quick run through the W3 validator, doesn't hurt :D<!--content-->there are Download <!--more-->able validators, cse validator is quite a popular version (free), after you've finished your site andvalidated it with that just give it a quick run through the W3 validator, doesn't hurt is there a Download <!--more-->able CSS validator?<!--content-->hehe, you can Download <!--more--> the w3 css validator, here (<!-- m --><a class="postlink" href="http://jigsaw.w3.org/css-validator/">http://jigsaw.w3.org/css-validator/</a><!-- m -->) ;) :D<!--content-->thanks man ;)<!--content-->Wanna centre a webpage? <br />
<br />
<br />
Use this: <!-- m --><a class="postlink" href="http://www.vladdy.net/Demos/htmlandbodystyling.html">http://www.vladdy.net/Demos/htmlandbodystyling.html</a><!-- m --><br />
<br />
<br />
<br />
<br />
Discuss.<!--content-->
 
Back
Top