You need a little change in CSS. Create td
height:100%;
works for IE 8 and FF 3.6, but it doesnโt work for Chrome.
td { width: 200px; border: solid 1px green; height: 100% } td a { display: block; height:100%; width:100%; }
But creating 50px
height
works for Chrome in addition to IE and FF
td { width: 200px; border: solid 1px green; height: 50px } td a { display: block; height:100%; width:100%; }
Edit:
You yourself gave the decision in another post; which should use display: inline-block;
. This works in conjunction with my solution for Chrome, FF3.6, IE8
td { width: 200px; border: solid 1px green; height: 100%} td a { display: inline-block; height:100%; width:100%; }
Update
The following code works for me in IE8, FF3.6 and chrome.
CSS
td { width: 200px; border: solid 1px green; height: 100%; } td a { display: inline-block; height:100%; width:100%; } td a:hover { background-color: yellow; }
HTML
<table> <tbody> <tr> <td> <a href="http://www.google.com/">Cell 1<br> second line</a> </td> <td> <a href="http://www.google.com/">Cell 2</a> </td> <td> <a href="http://www.google.com/">Cell 3</a> </td> <td> <a href="http://www.google.com/">Cell 4</a> </td> </tr> </tbody> </table>
An example is presented here.
Gaurav Saxena Oct 19 '10 at 7:50 2010-10-19 07:50
source share