So this is quite interesting to me. I've got the following example markup:
<a href="test.html">
<h2>Hello World</h2>
<div>
<p>Hello again</p>
</div>
</a>
When I have my Google Chrome (Version 26) rendering this, it shows me exactly this markup. But when I add an anchor inside the div like this:
<a href="test.html">
<h2>Hello World</h2>
<div>
<p>Hello again</p>
<a href="something-else"></a>
</div>
</a>
The browser outputs the following:
<a href="test.html">
<h2>Hello World</h2>
</a>
<div>
<a href="test.html">
<p>Hello again</p>
</a>
<a href="something-else"></a>
</div>
So this is absolutely not what I want. I can imagine it might makes sense in order to be able to click the inner link, that the anchors are only applied to some elements, but I would need it just how i wrote it there. It makes sense, because I have to copy the inner div to another position via JavaScript. But when I do that, the code is already messed up and shows the first link.
Does anybody know how to deal with this?
Many thanks in advance!