|
Posted by rf on 12/20/07 08:35
<eliza.block@gmail.com> wrote in message
news:dad60e5a-7f42-43c3-ab9c-e7680df0b253@1g2000hsl.googlegroups.com...
> Does anyone know an elegant way to put anchors into a table? I have a
> large table with names, addresses, phone numbers for 100+ people, and
> links at the top to letters of the alphabet. I'd like to be able to
> put anchors within the table so that clicking on, say, "S" jumps to
> the names ending in S. But putting a line like <a id="S"></a> into the
> table between rows doesn't work. (It always jumps to the top of the
> table.) Same result for <div id="S"></div>.
That's because you cannot have an <a> between rows in a <table>. In fact the
only thing you can have in a <table> is <tr>'s, or perhaps a <tbody> etc.
The error correction I have seen is to put the offending <a> at the top of
the table.
> I discovered that <td id="S"></td> generates the right behavior; the
> problem is that it leaves an ugly space between rows in the table.
You also cannot put a <td> in a <table>. They must be inside a <tr>.
> Is there a neat solution that I'm missing?
Apply the id to an existing row:
<tr id="S"><td ...
> Thanks!
> Eliza
[Back to original message]
|