Good evening [EMAIL PROTECTED],
  
It was foretold that on 20-6-2005 @ 13:32:14 GMT-0500 (CDT) (which was
20:32:14 where I live) [EMAIL PROTECTED] would write:
  
<snipped a bit>

swc> However, there is one
swc> declaration that suggests using "margin: 0 auto" in the body rule, which
swc> supposedly center-aligns the webpage in the browser. However, testing
swc> reveals that it left-aligns the page, but placing this declaration in a
swc> container or wrapper works.
  
This explanation might help:

 Wrap the page's  contents  within a
 'wrapper' div e.g. 450 pixels wide:

body {
   text-align : center;
   min-width : 450px;
}


#wrapper {
   position : relative;
   text-align : left;
   width : 450px;
   margin-left : auto;
   margin-right : auto;
}

MSIE   5   doesn't  center  based  on  auto  left/right  margins,  but
text-align:center does center top-level divs, so you set the body with
text-align: center;.

To prevent negative (i.e. inaccessible) left-margins in narrow browser
windows (like Mozilla),you need to specify a min-width for the body as
wide as the wrapper itself. Hence the min-width: 450px;

To  reset  the  alignment after the text-align:center on the body, you
specify text-align: left; on the wrapper. The auto margins will center
the element in the containing (body) tag.

It's the method i use.
 
-- 
Best regards,
 Luc
_________________________

http://www.dzinelabs.com

Need a website?
http://www.w-orx.com

Powered by The Bat! version 3.5.25 with Windows 2000 (build 2195),
version 5.0 Service Pack 4 and using the best browser: Opera.

"Do you know why God withheld the sense of humour from women? That we
may love you instead of laughing at you." - Mrs. Patrick Campbell
(1865-1940) - British actress

******************************************************
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
******************************************************

Reply via email to