Anchor tag around table is not clickable in IE 6, 7 & 8

anchor, html-table, xhtml

Solution

You can add a JavaScript onclick event handler on the table to do the same thing as the link.

Edit: Removed initial suggestion since it behaved badly in other browsers.

Problem

The problem: when surrounding a table with an anchor tag, the table and everything within is not clickable in IE 6, 7 & 8. How do I solve this issue assuming I can't replace the table with divs? Sample code: ``` <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> <head> <title>Test</title> </head> <body> <a href="http://www.google.com"> <table height="35"> <tr> <td>I'm a link in a table, bet you can'tclick me!</td> </tr> </table> </a> </body> </html> ```

Original source