0

This is a variation of James Donnelly's answer to a clickable link in a TD question. I found a case where his answer doesn't completely work.

Here is the example in JSFiddle

I added vertical-align to td and lots of text to Parent1.

table.coolTable td {
        vertical-align:top;
        ... 

The problem is that the empty space under Parent2 is not clickable. How do I get that part clickable too? Specifying fixed unit heights works but I don't want to constrain my table with fixed heights.

Thanks!

ssimm
  • 1,908
  • 3
  • 16
  • 36

1 Answers1

1

The easiest solution would be to add onclick event listeners and a cursor: pointer; style to the tds.

HTML
<td onClick="document.location.href='#child'">
  ...
</td>

CSS
table.coolTable td {
  ...
  cursor: pointer;
}

Updated JSFiddle

Joseph Webber
  • 2,010
  • 1
  • 19
  • 38