HighDots Forums  

making table cells into links

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss making table cells into links in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
christoff915
 
Posts: n/a

Default making table cells into links - 07-15-2004 , 12:31 PM






hola,

i'm looking for a tutorial on how to make your table cells into links for my
drop-down menu. it's a pretty common thing, and i have seen a few snippets here
and there for the css code and other stuff, but i can't seem to get it to work.
can anyone point me to a tutorial for this? much appreciated if you can.

thanks
christoff


Reply With Quote
  #2  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: making table cells into links - 07-15-2004 , 04:35 PM






What browser support do you want to consider?

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"christoff915" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
hola,

i'm looking for a tutorial on how to make your table cells into links for
my
drop-down menu. it's a pretty common thing, and i have seen a few snippets
here
and there for the css code and other stuff, but i can't seem to get it to
work.
can anyone point me to a tutorial for this? much appreciated if you can.

thanks
christoff




Reply With Quote
  #3  
Old   
christoff915
 
Posts: n/a

Default Re: making table cells into links - 07-15-2004 , 07:10 PM



as many of them as possible, but i'm primarily concerned about IE, as our
business is a MCP system builder and networking company. but i'd prefer the
solution that makes it functional (or at least not totally screwed up) on other
browsers as well.


Reply With Quote
  #4  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: making table cells into links - 07-15-2004 , 07:54 PM



Adding event handlers to <td> tags will fail on NN4x and perhaps other
browsers as well, for what it's worth.

Why do you need to make the <td> tag into a link?

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"christoff915" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
as many of them as possible, but i'm primarily concerned about IE, as our
business is a MCP system builder and networking company. but i'd prefer
the
solution that makes it functional (or at least not totally screwed up) on
other
browsers as well.




Reply With Quote
  #5  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: making table cells into links - 07-16-2004 , 09:22 AM



John:

This is academically interesting, yet I am sure it's not a good method.
While I am not so fluent with the W3 specs, I feel pretty certain that
having a <table> tag inside an <a> tag is an illegal construction.
Nevertheless, DW doesn't seem to complain when I manually create that,
although its validation report contains this ominous line -

<mm_description><![CDATA[The tag:"table" is not allowed within: "a" It is
only allowed within: button, del, fieldset, iframe, ins, noframes, noscript,
object, td, th.[HTML 4.0]]]></mm_description>

In addition, here is the behavior of such a critter -

<a href="#"><table width="610" border="1" cellpadding="0" cellspacing="0"
bgcolor="#FFFFCC">
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table></a>


1. In IE6/WXPPro, I get a 'finger' ONLY on the border of the table, not
while over the cells themselves. If there is no border (i.e., border="0") I
get no link indication at all.

2. In FF 0.8/WXPPro, I get a 'finger' throughout as you say, but
unfortunately, that 'link-ness' extends from the right end of the table to
the right margin, so blank page space is still a link. This is true whether
the table has a border or not.

3. In Safari 1.0.1, I get the same as FF.

4. In IE5.2/Mac, I find linkage only within the boundary of the table
itself.

It doesn't feel like a production method to me.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"John Gaver" <jgaEVERYver (AT) ActionThingAmerica (DOT) org> wrote

Quote:
On 7/15/04 6:54 PM, in article cd75f9$lda$1 (AT) forums (DOT) macromedia.com, "Murray
*TMM*" <forums (AT) HAHAgreat-web-sights (DOT) com> wrote:

Adding event handlers to <td> tags will fail on NN4x and perhaps other
browsers as well, for what it's worth.

Why do you need to make the <td> tag into a link?

This kludge seems to work on most browsers.

Put a table inside the cell where you want the link to appear and wrap the
inner table in the link code, as follows:

a href="file.html" stuff ... ><table width="100%" stuff ...>Text and or
images</table></a

The whole inner table becomes hot. Since it is the full size of cell of
the
outer table, the outer table cell appears to be hot.

I am not aware of any browsers that this is not compatible with, but don't
hold me to that.

John Gaver
Action America
(forget everything to contact me direct)

Microsoft: (n) Job security for IT consultants.




Reply With Quote
  #6  
Old   
John Gaver
 
Posts: n/a

Default Re: making table cells into links - 07-16-2004 , 10:14 AM



On 7/16/04 8:22 AM, in article cd8kr9$gck$1 (AT) forums (DOT) macromedia.com, "Murray
*TMM*" <forums (AT) HAHAgreat-web-sights (DOT) com> wrote:

Murray, as I said, it is a kludge. Also, for the link to stay within the
boundaries of the table, it MUST be enclosed in a cell of another table,
which is what the original question referred to.

Try this.

<table width="610" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<a href="#"><table width="610" border="1" cellpadding="0"
cellspacing="0" bgcolor="#FFFFCC">
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table></a>
</td>
</tr>
</table>

In most browsers, this gives the effect of making the whole table within the
cell a link, without the hot area extending beyond the cell. It's a kludge.
But, when implemented as stated, there are only a couple of browsers that
don't give the exact desired effect. I used to use that, before CSS became
available.

In fact, I even used it recently, on a site that is still using an old,
pre-CSS, tables-based template, to make all of a sliced photo that was
included in a table hot. The reason for slicing the photo into the table,
was because I removed three cells, in the middle and replaced them with a
counter, that can be easily updated, since it changes every few days and I
don't have the time to deal with redoing the graphics. If you care to see
it, it's at:

http://www.ActionAmerica.org/houston/index.html

That site is built on an old tables template that I just have not had time
to update. Even so, for what it is, it works. It has taken as many as
407,000 hits in a single month. That page is always about the third or
fourth most popular. The counter, with the train photo, is the linked table.
The link actually extends out to the edge of the containing cell, but the
distance is short, so I didn't bother to put it in another table. After all,
that is a spare time site.

Also, look at the JavaScript "Crash Clock", on that page. When JS is
enabled, you see the number of hours since the last crash. Turn JS off and
reload and you see a gray text message, telling you what you are missing.
Whenever I use JS, if possible, I either make it transparent to non-JS
browsers or give them a polite message. Sometimes, you can't avoid it, so I
tell them in advance, as on the "Fun Stuff" menu, where I link to some JS
electronic ballots, which I hope to find the time to update before the next
election.

Like I said, it's a spare time site, so I get to play with it in different
ways. OTOH, because of the growing popularity of the site, I have recently
begun working on a new site design. I expect another big bump in hits next
week, since the site will be mentioned in an Associated Press article that
is expected to go national. I find it amazing that so many people want to
read what I write. I guess there's just no accounting for taste. 8^)

John Gaver
Action America
(forget everything to contact me direct)

Microsoft: (n) Job security for IT consultants.


Reply With Quote
  #7  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: making table cells into links - 07-16-2004 , 10:58 AM



John:

Quote:
it MUST be enclosed in a cell of another table
Oops. I see. It's a kludge, allright.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"John Gaver" <jgaEVERYver (AT) ActionThingAmerica (DOT) org> wrote

Quote:
On 7/16/04 8:22 AM, in article cd8kr9$gck$1 (AT) forums (DOT) macromedia.com, "Murray
*TMM*" <forums (AT) HAHAgreat-web-sights (DOT) com> wrote:

Murray, as I said, it is a kludge. Also, for the link to stay within the
boundaries of the table, it MUST be enclosed in a cell of another table,
which is what the original question referred to.




Reply With Quote
  #8  
Old   
christoff915
 
Posts: n/a

Default Re: making table cells into links - 07-16-2004 , 12:17 PM



ok, maybe i'm not being clear....what i'm looking to create is something along
the lines of what gary has on his apptools.com site. a css/table/text driven
pop-up menu that uses a cell as a link instead of just the text. gary has the
css code on his site, but i just can't seem to get it to work with the
pop-ups...the base navbar i can get to work fine, it's just the pop-up menus.
i'd post my code for it, but i got frustrated yesterday and deleted it and just
went with the pop-up menu i had previous. meh.
anyways, that's what i'm looking for, and i know that at least gary knows how
to make it.....i'm sure it can't be THAT difficult, but i'm at a loss....t's
been a long week and my brain hurts.

thanks in advance
christoff


Reply With Quote
  #9  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: making table cells into links - 07-16-2004 , 12:28 PM



(inline styles shown for clarity)

<td><a href="foo.html" style="display:block">This entire cell will be
clickable<a></td>

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"christoff915" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
ok, maybe i'm not being clear....what i'm looking to create is something
along
the lines of what gary has on his apptools.com site. a css/table/text
driven
pop-up menu that uses a cell as a link instead of just the text. gary has
the
css code on his site, but i just can't seem to get it to work with the
pop-ups...the base navbar i can get to work fine, it's just the pop-up
menus.
i'd post my code for it, but i got frustrated yesterday and deleted it and
just
went with the pop-up menu i had previous. meh.
anyways, that's what i'm looking for, and i know that at least gary knows
how
to make it.....i'm sure it can't be THAT difficult, but i'm at a
loss....t's
been a long week and my brain hurts.

thanks in advance
christoff




Reply With Quote
  #10  
Old   
John Gaver
 
Posts: n/a

Default Re: making table cells into links - 07-16-2004 , 01:06 PM



On 7/16/04 11:17 AM, in article cd8v2t$cm$1 (AT) forums (DOT) macromedia.com,
"christoff915" <webforumsuser (AT) macromedia (DOT) com> wrote:

Quote:
ok, maybe i'm not being clear....what i'm looking to create is something along
the lines of what gary has on his apptools.com site. a css/table/text driven
pop-up menu that uses a cell as a link instead of just the text.
What he is using is not tables, but CSS. Take a look at his CSS file. Look
for ".menu". The key is setting "block". I think that it should work in
tables, but I've never tried. Use CSS. Much easier. Once you have defined
the style, adding a new menu item is as easy as adding a new

<p><a href="...">paragraph text</a></p>.

That's the same thing that I used, without the slide out menus, at:

http://www.megafolia.com/

Fast and easy.

John Gaver
Action America
(forget everything to contact me direct)

Microsoft: (n) Job security for IT consultants.



Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.