Link to home
Start Free TrialLog in
Avatar of Mark
Mark

asked on

local anchors in a table - can it be done?

I'd like to put anchor references in a table as follows:

<tr><td><a name=anchor1></a>some text</td><td><a href="#anchor2">next</a></td></tr>
:
:
<tr><td><a name=anchor2></a>more text</td><td><a href="#anchor3">next</a></tr></tr>
:
:

etc.

but, when I click on the link, it doesnt' go to to the target row. Does this not work inside a table? (I.E. 8)
ASKER CERTIFIED SOLUTION
Avatar of te-edu
te-edu
Flag of Serbia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
A little note, you should be wrapping attributes values within double quotes:

<a name="anchor1">some text</a>
<a href="#anchor2">next</a>

<div style="height: 800px" >----</div>

<a name="anchor2">more text</a>
<a href="#anchor1">next</a>

Open in new window


You can also create anchors to an element ID which is often a lot easier:

<a href="#anchor1">next</a>

<div id="anchor1">My Stuff</div>

Open in new window

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mark
Mark

ASKER

Thanks for the tips on formatting an anchor tag, but my question was about putting the anchors and references inside a table. I've done these anchors a-plenty, but they weren't working inside my table.

The problem turned out to be that I misspelled the target name in the href tag (which I didn't do when I type my example in the posting). So, there wasn't a possibility of anyone solving this since I didn't post the actual error.

So, points all around for the help!
Avatar of Mark

ASKER

didn't really address my actual problem