Results 1 to 8 of 8

Thread: make table cell a link [resolved]

  1. #1

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945

    make table cell a link [resolved]

    IE lets me make a <td> element into a link. I have text inside the cell and I put the anchor tag outside of the <td></td> and it turns the entire cell into a link. Netscape doesn't like this, however, so I have to put the link on the word only, and now the user has to put the cursor over the word instead of just the cell.

    Is there any way around this in Netscape? I want to have the entire cell as a link!
    Last edited by ober0330; Jun 14th, 2004 at 01:21 PM.
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  2. #2
    Frenzied Member vbNeo's Avatar
    Join Date
    May 2002
    Location
    Jutland, Denmark
    Posts
    1,994

    Thumbs up

    You need to push the red button!!
    "Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
    - Zack de la Rocha


    Hear me roar.

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Code:
    <td style="cursor:hand;" onClick="document.location.href='whatever.php';">dfkjdf</td>

  4. #4

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    Originally posted by vbNeo
    You need to push the red button!!
    ***?

    Thanks mendhak.
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  5. #5
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    cursor: hand; is invalid and works only in IE. cursor: pointer; is proper CSS, but it doesn't work in IE prior to 6.

    The invalid but universal solution is
    cursor: pointer; cursor: hand;

    As for the other issue, <a> can only have inline content and <td> is a block. It's not allowed to nest td inside a. xlink would offer the solution, but you need proper XHTML for that which IE doesn't support - not that it supports xlink either.

    However, you can put an <a> around the whole content of the cell (provided it's only inline content) and give it a display of block. That should make if fill the whole cell.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  6. #6

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    Well, I've already switched to the javascript solution... and I did use both pointer types. Thanks anyways. Oh, and I also knew that Netscape didn't like nesting <td> inside of <a> because it is not proper CSS, but IE does it.... grrr... why can't everything work/fail the same!
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  7. #7
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Because some heed the specifications and some don't. Guess who I blame
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  8. #8

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    I'm with ya... is there any way to file suit against M$ for this? It's causing me temporary insanity and failure to meet personal deadlines therefore resulting in lackluster performance in the workplace. I think it's valid.
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width