Override anchor linking to end of title line
Permalink
On my customer’s website, I add anchor links to the beginning of each title on a newsletter page of articles. In the email they send out, each article as a link back to the site to continue reading the entire story. But what happens is the link takes them to the next line after the title, which looks goofy. I’ve resorted to putting the anchors at the beginning of the last sentence in the previous story. Then the anchor links looks to the "last blank space at the end of the line," which is the following story.
Anyone know how to get around that? I’m probably missing something obvious here. (Using concrete5 v6.3.3)
Many thanks!
Anyone know how to get around that? I’m probably missing something obvious here. (Using concrete5 v6.3.3)
Many thanks!
Have you tried using an id on the title element rather than an anchor?
I am not familiar with id. Is it a code I can enter in the html?
Yes. Instead of doing something like this
You would do this
Just like anchors you need to make sure that each is unique, lowercase and no spaces.
<p>Title 1 <a name="title-1"></a></p>
You would do this
<p id="title-1">Title 1</p>
Just like anchors you need to make sure that each is unique, lowercase and no spaces.
I entered the code with the title, set the outside link reference to #title-1, and it still went to the end of the line/next line. Did I enter the link reference right?
Can you please send a link to the page?
Here's the page I was running the test on: (first article)
In the right column, I linked the first bookmark to the first article. (It is usually in an external email, but this is the same link reference.)
http://www.holdenadvisors.com/holden-resource-center/holden-pricing-newsletter/newsletter-44/
In the right column, I linked the first bookmark to the first article. (It is usually in an external email, but this is the same link reference.)
This is all working properly, the problem isn't with the code it's with your sticky header. The anchors link the text to the top of the screen, but in your case the sticky header is covering up the top 45px of the site.
Unfortunately, there isn't a good way to tell the site to put the anchor text 45px lower than the top of the screen.
Unfortunately, there isn't a good way to tell the site to put the anchor text 45px lower than the top of the screen.
Ah, I see. I can live with it for the top article at least. Thanks so much for your help today!
It looks like there are a few CSS solutions that might work for this, if you want to play with them to get the headers to show below the header.
http://stackoverflow.com/questions/10732690/offsetting-an-html-anch...
http://stackoverflow.com/questions/10732690/offsetting-an-html-anch...