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

Discussion in 'HTML' started by Frank, Dec 7, 2006.

  1. Frank

    Frank Guest

    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
    <td> in 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
     
    Frank, Dec 7, 2006
    #1
    1. Advertising

  2. Frank

    Blue Apricot Guest

    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
    > <td> in 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
     
    Blue Apricot, Dec 7, 2006
    #2
    1. Advertising

  3. Frank

    BootNic Guest

    > Frank <> wrote:
    > news:
    > 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 <td> in 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*
     
    BootNic, Dec 7, 2006
    #3
    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. Replies:
    0
    Views:
    530
  2. jack

    css in tables and cells

    jack, Sep 25, 2003, in forum: HTML
    Replies:
    3
    Views:
    512
    =?iso-8859-1?Q?brucie?=
    Sep 26, 2003
  3. mark4asp
    Replies:
    2
    Views:
    620
    Jasbird
    Nov 11, 2006
  4. Joel Finkel

    Cells[].Text or Cells[].Controls[0]

    Joel Finkel, Sep 1, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    311
    Joel Finkel
    Sep 1, 2003
  5. rsd
    Replies:
    1
    Views:
    98
    Richard Cornford
    Jul 8, 2003
Loading...

Share This Page