A newbie question: I am trying to center a DIV block without specifying its width explicitly: I'd like the width to depend on DIV's contents. I set 'display' property to 'table' as shown below:
------------------------------------------------ <html> <head><title>Centering DIV</title></head> <body> <div style="margin-left: auto; margin-right: auto; display: table"> hello! </div> </body </html> ------------------------------------------------ This works (at least in Firefox and Opera) but I'm not sure if this is a correct technique. Is there a right way do center a block without setting its width property explicitly? Thanks in advance, Yuri ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/