Forum Moderators: open
I need to be able to center a page's content to be in the center of the screen at all times no matter what resolution or browser.
The sites are brochure style with no scrolling. Any advice would be most appreciated. Thanks.
P.S. The size of the page content will need to be just under 800 x 600 px.
Thanks again.
Martin
[edited by: tedster at 11:50 am (utc) on Feb. 17, 2003]
No problem with recent Mozilla/Phoenix/Netscape or Opera, however.
I must admit that this one frutrates me so much that I still resort to the deprecated <center> tag - or table based layout.
I tend to do it the long way and use some JavaScript to get the available width and then calculate the left point of the layer. Not ideal I know, but it works!
Maybe version 7, eh?
My fingers are firmly crossed for this and are staying firmly that way! ;)
The problem here is that align is a deprecated attribute, and the <center> tag is deprecated as well. But their replacements aren't well supported right now.
Here's a thread about deprecated elements in HTML 4 [webmasterworld.com]. If you haven't seen this before, it can be a real eye opener.
Now, to be sure, "deprecated" doesn't mean it won't work -- these elements are too widespread on the web to just get dropped without legacy support. But this is the shot across the bow - the change has begun and some day these elements will be retired to the old HTML home, never to work again.
1) ought then to give you contents flush against the left border of the window, a scrollbar and contents that has flown off the right edge.
2) content flows 50/50 off both sides of the window with now scrollbar for content scrolled out of the window to the left.
unfortunately, for method #1 there's bug in Mozilla so it does both things: flows content 25/75 out of the window without scrolling to the left.
[bugzilla.mozilla.org...]