|
| |
|
|
adamadan
Posts: 2 Joined: 1/8/2008 Status: offline
|
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>
< Message edited by Spooky -- 1/22/2008 14:21:16 >
|
|
|
|
Tailslide
Posts: 5915 Joined: 5/10/2005 From: Out here on the raggedy edge Status: offline
|
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.
_____________________________
"My strategy is so simple an idiot could have devised it" Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|