infobox width

Hi,

How to set the infobox so that it will change the width according to the contents automatically? If infobox has no such function then how can I set the infobox width dynamically according to the entity selected.

Thanks.

James