2 replies [Last post]
Googolplex
Offline
newbie
Last seen: 17 years 44 weeks ago
Timezone: GMT+1
Joined: 2004-09-02
Posts: 2
Points: 0

Hi, how do I make a <td></td> work as a link.

I can do it using JavaScript:

<td class="cell" onclick="location.href='http://www.foo.dk/bar.php'"></td>

But I'd like to do it using only CSS, is this possible ?

TimeBandit
Offline
Enthusiast
Maryland, USA
Last seen: 17 years 44 weeks ago
Maryland, USA
Joined: 2004-09-02
Posts: 112
Points: 0

Table cell as link

interesting, can you show me where this is in use?

you could put an A around a DIV and put the DIV inside the TD but if the DIV is empty then there would be no link. i think there's a better way to handle what you want but i am having trouble visualizing why you'd want to link a TD in the first place. got a link?

Googolplex
Offline
newbie
Last seen: 17 years 44 weeks ago
Timezone: GMT+1
Joined: 2004-09-02
Posts: 2
Points: 0

Table cell as link

Sure:

http://test.googolplex.dk/booking/bookingtemplate.php

I am using the method I mentioned above at the moment.