Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > giva a <tr> a link

Reply
Thread Tools

giva a <tr> a link

 
 
Stijn Goris
Guest
Posts: n/a
 
      10-04-2004
hi all,

I do
<table>
<a href="..">
<tr>
<td>
content
</td>
</tr>
</a>
</table>

When I go over the content the arrow doesn't change from the usual arrow to
the hand (normal when hovering above a link) but the edit cursor shows up (T
with feet). Is use IE 6.0. It seems that IE doesn't work wel with tr that
have a link. Can I make this work in IE and other browser in another way
(maybee CSS)?

Regards
Srijn


 
Reply With Quote
 
 
 
 
Matt N. Jones
Guest
Posts: n/a
 
      10-04-2004
"Stijn Goris" <(E-Mail Removed)> writes:

> hi all,
>
> I do
> <table>
> <a href="..">
> <tr>
> <td>
> content
> </td>
> </tr>
> </a>
> </table>
>
> When I go over the content the arrow doesn't change from the usual arrow to
> the hand (normal when hovering above a link) but the edit cursor shows up (T
> with feet). Is use IE 6.0. It seems that IE doesn't work wel with tr that
> have a link. Can I make this work in IE and other browser in another way
> (maybee CSS)?


Try this:

<table>
<tr>
<td>
<a href="..">
content
</a>
</td>
</tr>
</table>

You're making the mistake of trying to put a table row inside an anchor
tag. It should be the other way round.

Matt


 
Reply With Quote
 
 
 
 
Michael Winter
Guest
Posts: n/a
 
      10-04-2004
On Mon, 4 Oct 2004 11:42:22 +0200, Stijn Goris <(E-Mail Removed)> wrote:

[snip]

> <table>
> <a href="..">
> <tr>
> <td>
> content
> </td>
> </tr>
> </a>
> </table>


You cannot place a table row inside a link for two reasons:

1) Links cannot be the child of any table-related element, other than a
cell. That means that:

<table>
<a ...><tbody> or <a ...><tr>

<tbody>
<a ...><tr>

<tr>
<a ...><td>

are all invalid. Only

<td><a ...>

is possible.

2) Links can only contain inline elements - text, images, phrase elements
(STRONG, CODE, etc), and the like. Table rows would be, if anything,
block-level elements.

I'm afraid you'll have to rethink your design, unless adding links with
the same destination to all table cells in a row is acceptable. Even then
you'll have problems if those cells contain block-level elements.

[snip]

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
 
Reply With Quote
 
yandr
Guest
Posts: n/a
 
      10-04-2004

"Stijn Goris" <(E-Mail Removed)> wrote in message
news:41611aec$0$22098$(E-Mail Removed)...
> hi all,
>
> I do
> <table>
> <a href="..">
> <tr>
> <td>
> content
> </td>
> </tr>
> </a>
> </table>


As others have posted, this is not valid HTML.

However, if what you are trying to do is make the whole ROW of the table
behave as a link, you will have to resort to CSS and even then you will
only be able to turn a TD into a whole link.

--

Fleur de Coin
- http://www.fleur-de-coin.com/
Ελληνικός στρατός
- http://skopia.digitalrice.com/



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is D-Link DSL-604T same as D-Link DSL-604+ ? norm Wireless Networking 6 11-18-2005 10:25 AM
RE: Link Link Link =?Utf-8?B?REw=?= Windows 64bit 0 05-17-2005 12:15 PM
Re: Link Link Link DANGER WILL ROBINSON!!! Kevin Spencer ASP .Net 0 05-17-2005 10:41 AM
Single FE Link for State/Link PIX Failover Matthew Melbourne Cisco 2 01-10-2005 06:58 PM
D-LINK DWL-AG650 doesn't work with WinXP - Zero Configuration Service (WZCSVC) / D-Link AirXpert nearly works Johannes Rosenstock Wireless Networking 0 08-27-2004 11:49 PM



Advertisments