Chris Leipold <cl******@dietzk.de> wrote:
I habe a page with an image with variable width. I need a caption below
the image with the same width as the image.
See http://www.dietzk.de/test/ - the first example is what I need.
This first example works fine as long as I know the image width. But if
I don't know it (and later I won't) it does not.
span{display:inline-table;width:2em}
<span>
<img src="img.jpg" alt="something suitable">
caption caption caption caption caption caption
</span>
Won't work in Mozilla or IE. Or:
span{display:table;width:2em}
<span>
<img src="img.jpg" alt="something suitable">
caption caption caption caption caption caption
</span>
Won't work in IE and forces the img/caption combo to block. Or:
http://www.spartanicus.utvinternet.i...d_to_image.htm
Works in all three, but the img/caption combo renders as block in
Mozilla.
Take your pick :-)
--
Spartanicus