Re: [css-d] centering elements in IE
Rimantas Liubertas wrote: >> Hi all, >> >> In most browsers, I can do things like >> >> img.logo { margin: 0 auto; } >> >> which results in the element centred within its parent container. >> >> Of course, this does not work with IE. Short of adding >> a text-align:center to the parent (which is *not* what I want), how >> can one get the same effect with IE? >> > > "Of course" part is wrong here. This does work in IE6+, just make sure > that IE is in "standards-compliant" mode. > > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnie60/html/cssenhancements.asp > > Regards, > Rimantas > > If it still doesn't work make sure the image in question is set to display: block; __ 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/
Re: [css-d] centering elements in IE
> Hi all, > > In most browsers, I can do things like > > img.logo { margin: 0 auto; } > > which results in the element centred within its parent container. > > Of course, this does not work with IE. Short of adding > a text-align:center to the parent (which is *not* what I want), how > can one get the same effect with IE? "Of course" part is wrong here. This does work in IE6+, just make sure that IE is in "standards-compliant" mode. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnie60/html/cssenhancements.asp Regards, Rimantas -- http://rimantas.com/ __ 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/
Re: [css-d] centering elements in IE
Op 23-okt-2006, om 20:07 heeft martin f krafft het volgende geschreven: > Hi all, > > In most browsers, I can do things like > > img.logo { margin: 0 auto; } > > which results in the element centred within its parent container. > > Of course, this does not work with IE. Short of adding > a text-align:center to the parent (which is *not* what I want), how > can one get the same effect with IE? > > Cheers, > > -- > martin; (greetings from the heart of the sun.) > \ echo mailto: !#^."<*>"|tr "<*> mailto:"; [EMAIL PROTECTED] Use text-align: center; on the parent element. Stefan __ 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/
[css-d] centering elements in IE
Hi all, In most browsers, I can do things like img.logo { margin: 0 auto; } which results in the element centred within its parent container. Of course, this does not work with IE. Short of adding a text-align:center to the parent (which is *not* what I want), how can one get the same effect with IE? Cheers, -- martin; (greetings from the heart of the sun.) \ echo mailto: !#^."<*>"|tr "<*> mailto:"; [EMAIL PROTECTED] spamtraps: [EMAIL PROTECTED] "administration for windows networks is similar to maintaining a 12 year old gm truck. brand new, w2k+3 already has 190k miles of wear." -- jeremiah cornelius signature.asc Description: Digital signature (GPG/PGP) __ 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/