Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 355
  • Last Modified:

anchor <a> for entire <td> column

How can I get an anchor <a href="..."> inside a table cell <td> to
apply to the entire cell? The css width works for I.E., but not for
Netscape. In the code below, the red is an active link. In I.E.
it applies to the entire width of the cell. But in Netscape, it
applies only to the text "aaa".

<html>
<body>
<table>
<tr><td>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</td></tr>
<tr><td><a href="http://www.mypage.com" style="{width:100%; background-color:red}">aaa</a></td></tr>
</table>
</body>
</html>

0
lfrohman
Asked:
lfrohman
1 Solution
 
GrandSchtroumpfCommented:
<tr><td><a href="http://www.mypage.com" style="display:block; width:100%; background-color:red">aaa</a></td></tr>
0
 
raterusCommented:
This works well too, if they "miss" the link

<td onclick='location.href="http://www.mypage.com";'><a href="http://www.mypage.com">Blah</a></td>
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now