View Full Version : Linking <td>'s
jlp09550
09-19-2007, 04:27 PM
Alright, I'm no HTML expert, but I'm getting into the game of expert status on HTML.. anyways.. I've been bugging around this one issue.. linking entire <td>. Here's a sample code:
<!--Row 3-->
<tr>
<a href="?choice=3,1&multi_protect=<?php echo $multi_protect;?>"><td class='cp-table' height='50' style="cursor: pointer;">X</td></a>
<a href="?choice=3,2&multi_protect=<?php echo $multi_protect;?>"><td class='cp-table' height='50' style="cursor: pointer;">X</td></a>
<a href="?choice=3,3&multi_protect=<?php echo $multi_protect;?>"><td class='cp-table' height='50' style="cursor: pointer;">X</td></a>
</tr>
The problem being is that Internet Explorer hates my coding.. anytime. Firefox != IE of course.. but still, how do I get is to work cross-platform?
Thanks!
What page is that on to be exact? If I could look at it from the finished product, I might be able to think of something.
And I believe td is used for columns/rows in a table, that's all I would know. I've used them before, but just simply as td.
jlp09550
09-19-2007, 04:41 PM
What page is that on to be exact? If I could look at it from the finished product, I might be able to think of something.
And I believe td is used for columns/rows in a table, that's all I would know. I've used them before, but just simply as td.
You need an account to view this page, but..
http://www.chibipaws.com/games/find_chibipet/
You need an account to view this page, but..
http://www.chibipaws.com/games/find_chibipet/
( x | x | x | x )
( x | x | x | x )
( x | x | x | x )
( x | x | x | x )
Looks something like this I believe.
jlp09550
09-19-2007, 04:45 PM
( x | x | x | x )
( x | x | x | x )
( x | x | x | x )
( x | x | x | x )
Looks something like this I believe.
Yes, it does.
Yes, it does.
And what exactly are you trying to do? I assume add a link to it for the game, right?
jlp09550
09-19-2007, 04:51 PM
And what exactly are you trying to do? I assume add a link to it for the game, right?
Yeah, link the entire <td>. But IE refuses to do so.
Yeah, link the entire <td>. But IE refuses to do so.
Even though I am not that good with HTML, the /a command is OUTSIDE both sides of the column, not sure if that would be it or not.
Tigress
09-19-2007, 05:02 PM
No. Just no.
jlp09550
09-19-2007, 05:05 PM
No. Just no.
No what? Not possible?
Even though I am not that good with HTML, the /a command is OUTSIDE both sides of the column, not sure if that would be it or not.
Doing inside the <td> will cause the text to be linked. I want the ENTIRE <td> to work.
Doing inside the <td> will cause the text to be linked. I want the ENTIRE <td> to work.
Why not make the X bigger or put in a word/phrase to click on instead? After all it isn't a treasure map.
jlp09550
09-19-2007, 05:11 PM
Why not make the X bigger or put in a word/phrase to click on instead? After all it isn't a treasure map.
Hmm, that is possible, I would use an image to create an image map instead.. maybe I should do that instead..
Hmm, that is possible, I would use an image to create an image map instead.. maybe I should do that instead..
I think that might be easier and more interesting to look at than Xs.
OwlManAtt
09-19-2007, 05:13 PM
There are two types of elements in HTML - block-level elements and in-line elements. Block level elements may contain other block-level elements and/or in-line elements. In-line elements may NOT contain block-level elements.
HTML 4 (which XHTML is based off of, so that covers all of our bases here) defines the table and TD elements as a block-level element. The a element is defined as an in-line element.
If Firefox is respecting you putting a elements around TDs, then Firefox is violating the specification and IE is behaving correctly.
vBulletin® v3.7.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.