View Full Version : Hyperlinking a table cell
trocadero
07-11-2005, 02:25 AM
Does anyone know the HTML code to link a whole table cell, rather than just the text or image in it?
Thanks!
Carolyn
jscheuer1
07-11-2005, 07:50 AM
Support for that is spotty and unorthodox, I am referring to the obvious:
<a href="somepage.html"><td>whatever</td></a>That would be the only true way though. You probably could simulate the effect using padding for the link to make it the size of the cell or dimensions and/or padding for the image to do likewise. This worked real well for text links in a 3 celled <table width="450" height="200">:
<style type="text/css">
table {
border-collapse:collapse;
border:1px solid lime;
}
td {
border:1px solid lime;
margin:0;
padding:0;
width:32.5%;
height:100%;
text-align:center;
}
a {
height:100%;
width:100%;
padding:80px 20px;
}
</style>in IE and pretty well in FF (didn't get the entire width of each cell as a link but, close).
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.