1

I have the following code:

<tbody>
<tr class="listing_left">
    <td>Info Here</td>
</tr>
<tr class="listing_right">
    <td>Info Here</td>
</tr>
</tbody>

It is being pulled dynamically so that is for each product. So if I have 20 products, it shows that code 20 different times for each product.

I need each of those to link to a specific link. I tried wrapping the whole tbody in an anchor and that did not work. I tried wrapping the individual tr's in an anchor and that did not work.

If I wrap each TD in an anchor then that will work but the anchor is only for the specific text, it doesn't expand to the entire TR, which I need.

Any suggestions?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Drew
  • 6,736
  • 17
  • 64
  • 96
  • See this: http://stackoverflow.com/questions/1460958/html-table-row-like-a-link –  Feb 19 '14 at 04:34

1 Answers1

3

Well you can only have anchor tag within the td tag so I would suggest that you change your layout so you use divs instead of tables

Then you can do something like this:

<div>
   <div class="listing_left">
       Info Here
   </div>
   <div class="listing_right">
       Info Here
   </div>
</div>
Kimtho6
  • 6,154
  • 9
  • 40
  • 56