I created a gadget with live MLB scores.
I get the scores from ESPN, in a php-page, there i format them to the way i like.
in the gadget i have an iframe with the php-page and an auto-refresh, all is displayed ok, except for the fact that the number of games changes every day, but the height of the gadget doesn't change with it.
so i have a huge whitespace below the scores now.

Is there a way to have the gadget find out where the text of the iframe stops and end the gadget there, instead of this huge whitespace

Re: Sidebar Gadget Development Dynamic height of a gadget (depending on content)

Jonathan Abbott

Try the height or offsetHeight of the IFRAME. One of them should have the height of the IFrame.

If that doesn't work, try the offsetTop of an element below the IFRAME.