Previous Demo Back to the Codrops Article

Making SVGs Responsive

The gray border is the border of the container with the SVG object.
Resize the window to test the SVG fluidity.

SVG as object with fluid width

Fallback text

					
<object type="image/svg+xml" data="img/logo.svg">
  <h3>Fallback text</h3>
</object>						
					
				
					
.container {
  border: 10px solid #b6bdc3;
  width: 100%;
  background: #fff;
  margin: 0 auto;
}

/* Required to make image fluid in IE */

object {
  width: 100%;
}