adamadan -> Center the body..... (1/8/2008 21:23:00)
hi I'm new here and very new in dreamweaver and this would be my first post...[:)]
How can I center the body of the page?? so that it make a standard size of 800x600 even I am using 1024x768 screen resolution??
dreamweaver expert here.... thanks.....
<edit - links in sig only please>
Tailslide -> RE: Center the body..... (1/9/2008 2:46:02)
I don't use DW but to make a fixed-width page that displays on a 800px wide browser without a horizontal scrollbar you want a container width of around 760px wide.
To centre it you need to do a few things.
1. Ensure that you have a valid DOCTYPE 2. Then add the following rules to your stylesheet (assuming your 760px wide containing div is called #container):
body {text-align:center;}
#container {margin:0 auto; text-align:left;}
The margin: 0 auto; rule will centre the div in all modern browsers (and IE6/7 as long as you've got a valid DOCTYPE). The text-align: center rule will centre the div in older browsers such as IE5/IE5.5 and then the text-align:left rule normalises the text in all browsers.