470,602 Members | 1,709 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,602 developers. It's quick & easy.

ToolTips and Tables -- how can I have tooltips on the cells of a column?

I could use your help. I need to add tooltips to each column of an
HTML table, for the entire column of cells. I want to add a single
element to the table, and have that one element represent the tooltip
for all the cells in the column.

I'm doing the brute-force method right now of adding a tooltip to every
<tdin the table. The problem there is that the HTML is ballooning in
size as a result (see an example below).

Any ideas, examples or help on this?

<tbody>
<tr>
<td class="bluedata" title="Column 1 ToolTip"Row 1</td>
<td class="yellowdata" title="Column 2 ToolTip"Row 1</td>
<td class="bluedata" title="Column 3 ToolTip"Row 1</td>
</tr>
<tr>
<td class="bluedata" title="Column 1 ToolTip"Row 2</td>
<td class="yellowdata" title="Column 2 ToolTip"Row 2</td>
<td class="bluedata" title="Column 3 ToolTip"Row 2</td>
</tr>
.......
<tr>
<td class="bluedata" title="Column 1 ToolTip"Row 140</td>
<td class="yellowdata" title="Column 2 ToolTip"Row
140</td>
<td class="bluedata" title="Column 3 ToolTip"Row 140</td>
</tr>

Thanks,
Frank

Dec 7 '06 #1
2 11875

Frank wrote:
I could use your help. I need to add tooltips to each column of an
HTML table, for the entire column of cells. I want to add a single
element to the table, and have that one element represent the tooltip
for all the cells in the column.

I'm doing the brute-force method right now of adding a tooltip to every
<tdin the table. The problem there is that the HTML is ballooning in
size as a result (see an example below).

Any ideas, examples or help on this?

<tbody>
<tr>
<td class="bluedata" title="Column 1 ToolTip"Row 1</td>
<td class="yellowdata" title="Column 2 ToolTip"Row 1</td>
<td class="bluedata" title="Column 3 ToolTip"Row 1</td>
</tr>
<tr>
<td class="bluedata" title="Column 1 ToolTip"Row 2</td>
<td class="yellowdata" title="Column 2 ToolTip"Row 2</td>
<td class="bluedata" title="Column 3 ToolTip"Row 2</td>
</tr>
.......
<tr>
<td class="bluedata" title="Column 1 ToolTip"Row 140</td>
<td class="yellowdata" title="Column 2 ToolTip"Row
140</td>
<td class="bluedata" title="Column 3 ToolTip"Row 140</td>
</tr>

Thanks,
Frank
Well one idea would be to use nested tables, having a 3 column one
contain a one column table in each of its 3 columns:"column1" table
date in first TD, "column2" table date in second TD, etc, with the
appropriate tooltip on the main table's 3 TDs.

But... why are you concerned about "ballooning HTML"? I wouldn't worry
about that, unless it was somehow interferring with performance which
is unlikely in this scenario.

Hope that helps,
Blue Apricot 416

Dec 7 '06 #2
Frank <fx*******@gmail.comwrote:
news: 11*********************@n67g2000cwd.googlegroups.c om
I could use your help. I need to add tooltips to each column of an
HTML table, for the entire column of cells. I want to add a single
element to the table, and have that one element represent the tooltip
for all the cells in the column.

I'm doing the brute-force method right now of adding a tooltip to
every <tdin the table. The problem there is that the HTML is
ballooning in size as a result (see an example below).

Any ideas, examples or help on this?
[snip]
<td class="bluedata" title="Column 1 ToolTip"Row 1</td>
<td class="yellowdata" title="Column 2 ToolTip"Row 1</td>
<td class="bluedata" title="Column 3 ToolTip"Row 1</td>
[snip]
Javascript for the ones that have javascript enabled, and (at least for
opera users) have tooltips enabled.

Some of the bloat can be removed if the method of applying the td
style is changed, I see no real need to declare the inline class. Show
what your bluedata & yellowdata classes are if you are interested.

--
BootNic Thursday, December 07, 2006 5:04 PM

All things come to him who waits - provided he knows what he is
waiting for.
*Woodrow T. Wilson*

Dec 7 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

44 posts views Thread by Mariusz Jedrzejewski | last post: by
4 posts views Thread by Matt Stanley | last post: by
2 posts views Thread by Stevie_mac | last post: by
reply views Thread by Jerry K via DotNetMonster.com | last post: by
2 posts views Thread by jab3 | last post: by
2 posts views Thread by Scamjunk | last post: by
4 posts views Thread by jswill | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.