Although it might be worth running your template through a code validator.
I think it's this problem for which Auctiva Jeff contends that it's probably usually bad code (like an end tag missing or something) and that the gaps are caused by the editor trying to fix it.