On Sat, Nov 15, 2008 at 9:50 PM, Gunlaug Sørtun <[EMAIL PROTECTED]> wrote:
> Henrik Nyh wrote:
>> What I expect is for the div to contain the image, so the div is stretched
>> out to the width of the image plus the div padding.
>> http://nyh.name/x.html
>
> <http://www.gunlaug.no/tos/alien/hn/Test.htm>

Thanks a lot, Gunlaug.

I would be curious to hear if you (or anyone else) know *why* the div
does not grow to fit without using floats.

That did fix the particular issue, though it has some undesirable
side-effects like having to deal with floats (the actual page is, of
course, a little more complex than the example) and that for small
images, the div will shrink (without float, it becomes no smaller than
the window width). A small div would be okay if I could center it, but
since it's floated that becomes tricky also...

I think if there is no easy and simple solution for this, I think I
will take the easy way out and go with max-width:100% on the img; it
will be made smaller if the window is small, but I think all in all
I'd rather accept that than use a lot of workarounds.
______________________________________________________________________
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/

Reply via email to