Daniel Kabs wrote:
> I tried to apply the "Centering with auto-margins" technique 
> according to 
> http://css-discuss.incutio.com/?page=CenteringBlockElement
> 
> Please see the test page at 
> http://www.mobotixserver.de/~daniel/css_center_horizontally.html
> 
> The page works on Firefox and Konqueror but not on IE 6.0 (SP2).

Yes, IE6 centers block-element by auto-margins when in "standard
compliant" mode, but there's a flaw in IE when it is served absolute
positioned elements.

IE6 can *not* relate A:P elements to opposite sides of parent-container,
so only one of these properties is used...
   left: 0;
   right: 0;
...not both. IE ends up positioning '.center' according to 'left: 0;'
and ignores 'right: 0;'.
Result: the auto-margins becomes useless in that browser.

---

Other browsers will use both properties - which cancels them out since
the element has dimensions. Thus they end up "balancing" the element
horizontally so the auto-margins can act.
Result: perfect centering.

regards
        Georg
-- 
http://www.gunlaug.no
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to