Eric K wrote:
It must be something else because another template
also doesnt work and in that too:
1) I'm copy pasting the exact code from the template that is already working in
Wikipedia
2) its not using any CSS as well.
I'm going to try step by step trouble shooting to see whats going on.
As Rob Church told you, install tidy. When tidy is enabled MediaWiki
leaves some conversion to tidy, which allows tags open on one template
to be closed on another.
If not using tidy, MediaWiki will close the tag at the end of the first
template.