Search code examples
htmlinternet-explorer-8anchorblock

Odd behaviour in ie8 when an anchor tag comes first in a block element


In ie8 when I have an anchor first thing within a block element, you can hover over the end of the block element and it links to that anchor. This is very annoying and I have no idea how to fix it. In the following example, I removed all javascript and css.

<p><a href="http://www.gamefaqs.com/-/199180-">Vandal Hearts II</a> is a turn-based strategy RPG for PlayStation that was released in 1999.</p>

(Example Image)

More info: When I put a character before the it does not have this behaviour. I tried using a space and putting the code on different lines, etc, and none of that worked.


Solution

  • Does it have to be a p tag? As a span tag would be better suited here plus it solves that problem, as you can see in this Fiddle HERE.