I have this markup:
#widget1 {
height:100px;
width:200px;
}
<div class="widget" id="widget1">
<object data="foo.svg" type="image/svg+xml" />
</div>
I managed to make the <object>
element fill up the outer <div>
, but the inner foo.svg file has its own ideas how big it is. I need foo.svg (which consists of an <svg>
element, of course) to be the same size as <object>
and <div>
.
Try to add: width: XXXpx !important; height: XXXpx !important;
This is answered (with examples) in the svg primer.
tl;dr summary: