PDA

View Full Version : Website centering in a browser



Steve.Cooper
01-18-2005, 01:11 PM
Can anyone help with a script to centre my website in any browser.
I built a website sometime ago in html when everyone used 800 x 600. Now screens have got bigger the site sits to the left. Is there a script that would centre my website in any screen resolution.

Thanks

Steve

Minos
01-19-2005, 03:29 AM
well, you could use <center> tags...I'm pretty sure most would argue that you should use CSS (so I'll include it), but for a quick (maybe temporary) fix:

A) Put <center> directly under the <body> tag. Then, put </center> directly above the </body> tag.

or

B) Somewhere between the <head></head> tags, put:


<style type="text/css">
body {align:center;}
</style>