Empty Div Causing Very Strange Behavior

2019-07-21 22:07发布

问题:

Got something like this

<div class="something">

<div></div>

<p>
Some text here
</p>

</div>

This is all called in a template in XSL.

For some reason I am getting when it's rendered that the empty div is never closed. The <p> and its contents are inside this div. This continues on and on for each time this template is called. :( If I only take out the empty div, all the "something" divs are separate entities and not inside each other.

How could this be happening?!

回答1:

Try putting an

&nbsp;

inside the empty div.



标签: xslt html