you can use float to place the container
<div style="float:left;background:yellow;"> <img ...> <p>...</p> </div>
or you can try (doesn't work with IE7 ... but you can probably fix it)
<div style="display:inline;display:inline-block;background:yellow;"> <img ...> <p>...</p> </div>
and newer mozilla and webkit browsers have
<div style="width:fit-content;margin:0 auto;background:yellow;"> <img ...> <p>...</p> </div>
I'm not sure what will happen to your SVG, but in the <svg> declaration you can specify the actual size of the rendering of the AFAIK vectors
hoping to be helpful ..
user652649
source share