I have a table inside a hyperlink:
<a href="/"><table><tr><td>...</td></tr></table></a>
In all browsers, hovering over the table changes the pointer to a hand, and through some CSS the table background changes colour (so it looks ‘highlighted’).
However, in Internet Explorer, clicking the table has no effect. In Firefox and Chrome, it follows the hyperlink as expected.
How can I make IE follow the link when clicked?
You can’t nest block-level elements inside of inline elements and expect to get proper results (insert citation here).
You could add some CSS styles to the table and apply a
onclickhandler so that it acts like a hyperlink:And the
fakeLinkclass:And a demo demonstrating the two techniques: http://jsfiddle.net/qNGrp/4/. I don’t have IE, but I think only one will work properly.