I am looking for a technique that will allow me
to generate a <DIV>, the width of which is the
width of its widest non-shrinkable immediate child
element; the DIV will always be floated.

For example, consider the following :

        <DIV style="float: ...">
                <IMG src="..." alt="..." longdesc="http://...";>
                <P>Now is the time for all good men to come to the aid of the 
party</P>
        <DIV>

The image has a natural width, which for most
images will be wider than the width of (say)
"party" in the caption that follows.  But the following
paragraph is "shrinkable", in the sense that it has no
intrinsic width and could be as narrow as the longest
word therein (i.e., "party").  So I would like the text
in the caption paragraph to be forced to wrap to the width
of the image.  I do not want to use tables for reasons of
accessibility.

So far, my experiments and research have drawn a blank;
even Jukka's otherwise most helpful page [1] does not
seem to address this desideratum.  Can anyone advise,
please ?

Philip Taylor
--------
[1] http://www.cs.tut.fi/~jkorpela/www/captions.html

______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
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