Custom Widget Formatting Issue

Hi

I’ve got an odd problem with a Custom Widget on HABpanel… The widget displays fine in the preview window as per this screengrab..

But when I add the widget to one of my panels it displays as below…

What I can’t work out is whether it’s related to some of the other widgets on the panel.. The whole panel is as below..

Any ideas gratefully received

Please post your template code.