I have the following container holding both an image and a text element.
a bit of jquery?
$(function() { $('.container').width($('img#image').width()); });
FIDDLE