<h1>Auto-Scaling an SVG Image with a <code>viewBox</code>
<div>—watch out for IE and table layouts</div></h1>
<figure>
<figcaption><code>img</code>, 100xauto height</figcaption>
<div>
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/91525/potofgold.svg" style="width:100px">
</div>
</figure>
<figure>
<figcaption><code>img</code>, auto widthx50</figcaption>
<div>
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/91525/potofgold.svg" style="height:50px">
</div>
</figure>
<figure>
<figcaption><code>img</code>, auto size</figcaption>
<div>
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/91525/potofgold.svg">
</div>
</figure>
This Pen doesn't use any external JavaScript resources.