Jonas P

Sizing HTML with SVG

Here is a trick to size HTML elements like an image.

The SVG element includes elements from a different XML namespace.

Read more here.

<svg viewBox="0 0 100 100" preserveAspectRatio="xMinYMin meet">  <foreignObject width="100%" height="100%" xmlns="http://www.w3.org/1999/xhtml">    <!-- Insert HTML here! -->  </foreignObject></svg>