Forum:Template span element having trouble with tables and linebreaks

I'm having major trouble with a template I'm trying to use for mouseover tooltips at the Vanguard wiki, where I can't seem to be able to make it simultaneously useable inline in a paragraph and also in a wikitable cell. The template, Tooltip, exists of a single &lt;span&gt; element which I've tried using &lt;!-- and --&gt; tags to keep all on the same line between &lt;includeonly&gt; and &lt;/includeonly&gt; tags, but I've found that I need to use linebreaks so that it doesn't destroy any table it is inserted into.

I'd like to use it inline such as The quest rewards the Magic Box item. and also in a wikitable such as

At the moment, I have to use linebreaks in the template code, so that it works fine in the wikitable example, but breaks onto a newline in the inline paragraph example. When I keep the template code on the same line, it works fine in the inline paragraph example, but causes any cells following the tooltip in the wikitable example to be ignored as text.

What am I doing wrong - any help appreciated!

- User:Avaera3, 22:14, May 30, 2010 (UTC)
 * I fixed it for you. -- 22:57, May 30, 2010 (UTC)
 * Wow, thanks for the very prompt and helpful response... but was it just the &lt;onlyinclude&gt; tags? On the Template:Tooltip page there is an inline example of the template that still causes a linebreak afterwards, which is what I'm trying to avoid. I just realized you are the tooltip guru from which all other tooltips derive, which is quite amazing, so I think if anyone knows it is likely to be you! - User:Avaera3 03:55, May 31, 2010 (UTC)
 * Aha! Nevermind, it was just a matter of commenting out the newlines in the template again, now that the onlyincludes were working their magic. Thank you so much, it was such a small thing but really driving me nutty. So lovely to have that working, and thanks for the inspiration with the tooltips! - User:Avaera3 04:02, May 31, 2010 (UTC)