 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
Eli McGowan
Joined: 12 Aug 2005 Posts: 4 Location: http://www.elimcgowan.com
|
Posted: Fri Aug 12, 2005 1:20 pm Making a td a link |
|
|
|
I know how to make a link inside the <td></td> tags:
<table>
<tr>
<td>
<a href="website.html">Click Here!</a>
</td>
</tr>
</table>
But, can I make an entire td a link? The following code doesn't seem to work:
<table>
<tr>
<a href="website.html">
<td>
Click Here!
</td>
</a>
</tr>
</table>
I would like to be able to click anywhere in the the cell to link. Is it possible? How?
Thanks |
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8426 Location: Castle Pines North, CO USA
|
Posted: Fri Aug 12, 2005 6:54 pm |
|
|
|
The easiest would be to make an image and insert that image into the cell, else JS might be a method but not all that great |
|
gary.newelluk
Joined: 12 May 2005 Posts: 548 Location: Peterhead, Scotland
|
Posted: Sat Aug 13, 2005 2:06 pm |
|
|
|
You can use the onclick event of the <td> tag to link to another page for example:
| Code: |
<table border=1>
<tr>
<td onclick="window.location.href='http://www.newellwebservices.co.uk'">Click here for my website</td>
</tr>
</table>
|
You can make it look like a link by using the onmouseover event to change the cursor etc. |
|
Eli McGowan
Joined: 12 Aug 2005 Posts: 4 Location: http://www.elimcgowan.com
|
Posted: Fri Aug 26, 2005 6:36 pm Thanks! |
|
|
|
| Exactly what I was looking for. Thank You very much! |
|
Sloth
Joined: 15 Aug 2008 Posts: 1
|
Posted: Fri Aug 15, 2008 4:04 pm |
|
|
|
what if I want to keep the href style?
(as in
A:link, A:visited, A:active, .xxmenu a.set2:link, .xxmenu a.set2:visited, .xxmenu a.set2:active {color: #0000ff; text-decoration: none}
A:hover, .xxmenu a.set2:hover {color: #ff0000; text-decoration: none})
I've been trying to do it for a while now. |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
|
 |
|
|
|
|
|
|
|