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

 

Centering the page on the monitor - ANY monitor

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

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

All Forums >> Web Development >> Expression Web Help >> Centering the page on the monitor - ANY monitor
Page: [1]
 
dsulvett

 

Posts: 92
Joined: 7/8/2004
Status: offline

 
Centering the page on the monitor - ANY monitor - 5/8/2008 14:35:43   
Hello All;

I was wondering if someone could tell me how to have a page ALWAYS center in any web browsers (or the more popular ones)

Now, i was wondering if there was just some kind of java script line i could put into the code, or something small. For the amount of web stuff i do, i really dont want to learn CSS... im looking for a quick fix to this...

Thanks
Dave

Here is a sample www.152harrellave.com notice how it is off center!! thanks again
BobbyDouglas

 

Posts: 5432
Joined: 5/15/2003
From: Arizona
Status: offline

 
RE: Centering the page on the monitor - ANY monitor - 5/8/2008 15:39:29   
You will want to remove the javascript that resizes the window when testing this..

In your HTML code, right after the <body> tag, add:

<div align="center">

and then right before the </body> tag, add </div>



_____________________________

Arizona Web Design - Mr Bobs Web Design in Arizona
The Arizona Web Hosting Challenge

(in reply to dsulvett)
dsulvett

 

Posts: 92
Joined: 7/8/2004
Status: offline

 
RE: Centering the page on the monitor - ANY monitor - 5/9/2008 17:00:55   
Hi Bobby-
Thank you but either im doing this wrong or ???? when i do what you said, everything goes whacked! hmmm..can you show me an example please...

Thanks
Dave

(in reply to BobbyDouglas)
Tailslide

 

Posts: 5915
Joined: 5/10/2005
From: Out here on the raggedy edge
Status: offline

 
RE: Centering the page on the monitor - ANY monitor - 5/10/2008 2:46:54   
You've got everything positioned absolutely which will lead to major problems.

You've also got a 225px left and right margin on the body element and other elements. Try removing that for a start. You could try one of two methods.

1. Give the body element a width (820px?) and then add margin:0 auto; Also remove the 225px margin on the inner divs.
2. If that doesn't do the trick then as Bobby says - stick a div around all the content (apart from the menu which says it has to be first) and then give that a width plus margin:0 auto plus position:relative (very important that).

The page seems to be forcing the window size which is a bad idea (not polite to say the least).

To be honest you should think about removing the absolute positioning rules as they break the page under any other conditions than those you've specified.





_____________________________

"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 dsulvett)
Page:   [1]

All Forums >> Web Development >> Expression Web Help >> Centering the page on the monitor - ANY monitor
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