Forum Moderators: open

Message Too Old, No Replies

table as a link

         

pauliv

7:14 pm on Feb 10, 2002 (gmt 0)



I need to make a table or at list a cell of a table as alink. Is it possible, and how? thanks.

tedster

8:55 pm on Feb 10, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What a novel idea!

It's not valid code because it includes a block element (the table) inside an inline element (the anchor tag). W3C Reference [w3.org]

Not valid doesn't mean that it can't work -- so I tested some browsers. The only browser where it worked was Opera. You're going to need to rethink this area of your page.

Black Knight

9:34 pm on Feb 10, 2002 (gmt 0)

10+ Year Member



If the function is the main thing, rather than actually having an anchor tag then use a JavaScript 'OnClick' event to change the HREF property - i.e. a JavaScript redirect only trigered when the table is clicked.

To do the same with ordinary HTML you have to put an anchor tag around the entire contents of each and every cell (use CSS to remove underlining if you wish) and it would not allow clicking on the table borders to count.

Ammon Johns