Link to external page based on class rather than id

I would my web page 1 to have link that will load external page at the exact location where external page has following code?

<h3 class="content_title5">Specific Title</h3>

I was able to find this page which deals only with selector #id rather than class. Anyone has suggestion?

If you want a page to load to a specific location, it MUST have an ID. There can be multiple instances of a class on a page, while there is (or should only be) one instance of an id on a page.

1 Like

In Addition to what Dave said, EXTERNAL links are all based on URLs. The ID ( or hash) part of the HREF only serves to further specify what part of the HTML document the browser should directly point to.

That being said, you can still put an ID on your tags. As long as you done write any CSS rules around it , it won’t affect your styling, but still serve for navigation and scripting.

<h3 class="content_title5" id="content_title5" >Specific Title</h3>

Hope that helps

Yes you right. ID’s are unique. I cant do anything on target page since I don’t have admin right on it. If i could edit target page it would be no problem :slight_smile:

Well, get the person who does, to add the
id attribute in the appropriate place. :biggrin:

coothead

Yes that is going to be next step :slight_smile:

Job done. :winky:

coothead

I know am a bit late but here is a trick, if you have access to the CMS; you can often wrap a tag with an ID at the start of the content ( and sometimes even inhale headline, using the CMS’ text editor. :slight_smile:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.