mark drayton wrote: > I'm trying to use a combination of display: table and width: > 0% to force a div to expand to the width of its contents so > I don't have to specify > a width by hand. The div contains images and text, each in their own > div, and the images are wider than the text. I want to expand the text > div to be as wide as the image div. [...] > > http://mir.stevecole.org/~mark/files/test/
Try adding this: /*\*/ * html div#container { display: inline; width: auto; height: 1px; zoom: 1; } /**/ The backslash comment and "* html" are to feed this to IE/Win only (you can use conditional comments, if you prefer). The rest should be entered as it is, even if it looks totally non-sense. The purpose is to make IE/Win treat div#container as an inline-block, with your desired shrink-to-fit effect. You can probably also remove the width:0%. > Lastly, how disasterous does it look in Safari? Exactly as in Mozilla/FF, no disasters :) hth, Bruno ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/