On Sat, Nov 15, 2008 at 11:02 PM, Gunlaug Sørtun <[EMAIL PROTECTED]> wrote: > Henrik Nyh wrote: >>>> >>>> http://nyh.name/x.html >>> >>> <http://www.gunlaug.no/tos/alien/hn/Test.htm> > >> I would be curious to hear if you (or anyone else) know *why* the div >> does not grow to fit without using floats. > > You want a loss-free shrink-wrap effect and that can only be achieved > with floats or table.
Thanks a lot for the explanation. > ...and the "solution" in my test page will keep IE8 and probably also > future IE versions on level with IE5.5 - quirks mode, which is no good. By the "solution" in your test page, are you referring to your first reply with the floats on the body and div? > An HTML table construction would work though. That sounded promising. Tried it here: http://nyh.name/y.html Hope I understood you correctly. It mostly works (again, only tried in Firefox 3 and Safari 3 on OS X so far). The container (now a td instead of a div) is full-width for smaller images (see below the large image on y.html), and grows to contain larger images. With a small window and a large image, the white container will still go almost flush against the right-hand side of the window, though, and not respect the body padding, so not quite there. Perhaps there is no perfect solution. ______________________________________________________________________ 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/