Jump to content

Anchor Tags on Pages


RazorSEdge

Recommended Posts

Posted

I am trying to put in anchors on pages, however, It seems to be having some issues.  I am wanting to clarify this I am doing this properly.

Link = 

<a href="#anchorid">Link Text</a>

Anchor Location = 

<a name="anchorid" />

I was using Skinod's PHP and TXT widgets to place these, and at first it worked great, but after a few page refreshes the sidebar went to the bottom of the page in PC view and the text under the anchor location (which was in a WYSIWYG widget turned blue and upon mousing over highlighted red, although the formatting was set to automatic (black).

Any recommendations on how to improve this so it is not breaking pages?

I ended up having to delete the page as I couldn't remove the blocks (the kept reappearing) and no matter what I did the page layout was all screwed up.

Layout of my blocks:

WYSIWYG - Some text
HTML - Anchor Link(s)
HTML - Anchor Location
WYSIWYG - Text
HTML - Back To Top Anchor Link
HTML - Anchor Location
WYSIWYG - Text

etc

Posted

After thorough testing it seems that the way I am doing it above is what is breaking the page in pages.  Does anyone know of a good way to do anchors in pages using page builder?  

Towards the top of the page I simply need "quick jump" links to quickly move down the page to a specific location.

Posted
Anchor Location = 

<a name="anchorid" />

this is the cause of your troubles, an unclosed a tag is sure to break things.

<div id="anchorid"></div>

div or a span would be more suited really, also anchor location is based on id, not name.

​I'm still in the stone ages on some coding (a name), I have changed it around and after a good amount of testing it is working great now and no broken pages!

Thank you!

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...