Quote:
Originally Posted by repilo
SVG has another drawback for me that I, in my ignorance, have not been able to solve. Imagine you have an image that is wider than high, and you want to display it alone on a page. The best method might be the SVG wrapper, because I think it's the only way to automatically centre the image vertically, as well as ensuring that the aspect ratio is respected.
But if the image has a caption, I have not been able to display it below and close to the picture.
This is what I do:
Code:
<figure>
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1"
width="100%" height="100%" viewBox="0 0 506 259"
preserveAspectRatio="xMidYMid meet">
<image width="506" height="259" xlink:href="../Images/17.jpeg"/></svg>
<figcaption><b>Fig. 17:</b> Paragraph with several lines of text.</figcaption>
</figure>
If anyone knows how to solve it I would be very grateful.
|
I would recommend putting this question in it's own thread - it will get much more visibility that way. Also, there have been a few threads discussing this. Have you tried searching the forums??