The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Internal links not working
Leezinho
post Feb 21 2019, 11:58 AM
Post #1


Newbie
*

Group: Members
Posts: 11
Joined: 21-February 19
Member No.: 26,828



I have some links internal to the document, in a Table Of Contents at the top. When I click on one of the highlighted section titles, it should go to that section in the same document. I have tried three solutions, but none of them work. My anchors in the body of the document are named with a short form of the section title, with no "#" at front.

(I'm converting the HTML document to PDF. In the PDF document, _external_ links work okay.)

(1) <a href="#secTitle">Section Title in TOC</a>
TOC gives a little jump.

(2) <a href="fileName.pdf#sectTitle">Section Title in TOC</a>
Nothing.

(3) <a href="files/theme/fileName.pdf#sectionTitle">Section Title in TOC</a>
The webhost (Weebly) gives me a light blue screen with "Bye!" on it.

When I open the box for "Link Properties" of the TOC item, the ballot box for "URL is relative to page location" is already checked. That looks correct; when I uncheck it, the address refers to a file on my computer ("file:///c:/..."), which I don't want when I upload.

Suggestions?

This post has been edited by Leezinho: Feb 21 2019, 12:00 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies
Leezinho
post Feb 21 2019, 05:47 PM
Post #2


Newbie
*

Group: Members
Posts: 11
Joined: 21-February 19
Member No.: 26,828



I do edit HTML code directly, but with great care and trepidation.
The 23 targets are distributed throughout the document, at all distances from the TOC.
The small jump is an insignificant jitter: the text jumps up a line and back to its original position, if I remember correctly.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Feb 21 2019, 06:39 PM
Post #3


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,449
Joined: 9-August 06
Member No.: 6



Well, then I don't think we can help without seeing the whole thing. Do you have it on the web?

If you want to edit it, you don't need an A tag for the target at all, and especially not an empty one. You can use id as well as name (in fact you should, name is antiquated). And you can add an id attribute to any tag.

So you could do it like this.
HTML
<span style="font-weight: bold; id="form">
2. Variations of form.
</span>


The span isn't needed either, really. The heading should be in some kind of container, let's say a H3. Then you do it like this.

HTML
<h3 id="form" style="font-weight: bold">2. Variations of form.</h3>


Optimally the style attribute should also go and the CSS should be put in a separate style sheet instead.

But the markup is probably full of things like this, so I wouldn't bother. It should work as it is. Just wanted to explain what I meant before.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Leezinho
post Apr 18 2019, 06:39 AM
Post #4


Newbie
*

Group: Members
Posts: 11
Joined: 21-February 19
Member No.: 26,828



The problem got solved several weeks ago. Sorry, I don't remember how.
Thanks for your input.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 8th December 2019 - 06:05 AM