navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Center the body.....

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Dreamweaver Help >> Center the body.....
Page: [1]
 
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

(in reply to adamadan)
Page:   [1]

All Forums >> Web Development >> Dreamweaver Help >> Center the body.....
Page: [1]
Jump to: 1





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