giva a <tr> a link

Discussion in 'HTML' started by Stijn Goris, Oct 4, 2004.

  1. Stijn Goris

    Stijn Goris Guest

    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
     
    Stijn Goris, Oct 4, 2004
    #1
    1. Advertising

  2. "Stijn Goris" <> 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
     
    Matt N. Jones, Oct 4, 2004
    #2
    1. Advertising

  3. On Mon, 4 Oct 2004 11:42:22 +0200, Stijn Goris <> 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.
     
    Michael Winter, Oct 4, 2004
    #3
  4. Stijn Goris

    yandr Guest

    "Stijn Goris" <> wrote in message
    news:41611aec$0$22098$...
    > 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/
     
    yandr, Oct 4, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Spencer

    Re: Link Link Link DANGER WILL ROBINSON!!!

    Kevin Spencer, May 17, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    860
    Kevin Spencer
    May 17, 2005
  2. Graham Thomson
    Replies:
    3
    Views:
    467
    Eki Y. Baskoro
    Dec 18, 2003
  3. Dan M
    Replies:
    5
    Views:
    427
  4. kolesdz
    Replies:
    9
    Views:
    534
    Blinky the Shark
    Aug 22, 2007
  5. Marina Limeira

    LINK with another link

    Marina Limeira, Feb 7, 2006, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    118
    Marina Limeira
    Feb 7, 2006
Loading...

Share This Page