View Full Version : Text linking


Ryan Szablewski
04-17-2006, 05:21 AM
Does anyone know if there is a way where you can take a word from one page and when someone clicks on it it takes them to another page and to the location of a similiar description? almost like a custom anchor?

Jaffa_Cakes
04-17-2006, 06:01 AM
Hmmm, do you mean a link?

Ryan Szablewski
04-17-2006, 06:06 AM
no, like a target to another word on another page

Jaffa_Cakes
04-17-2006, 06:08 AM
Ohh, I getcha! sorry, Do you have I-frames? if you do, then this code is what you would use,
<center><A href="pagename.html" target="main">Text here</a>
Change the target to the name of the frame thingy!! I hope you understand that!!

Ryan Szablewski
04-17-2006, 03:09 PM
yeah i got that, but no, lol i dont have iframes. ive never seen it done before so i was just wondering if there was even a way.

kiwee
04-17-2006, 04:14 PM
there is a way:
around the text, or just before the text that you want to link to on the other page put the following code:

<a name="content"></a>

(i have called it content, but you can call it anything that will help you understand what the text is about, as long as you don't put spaces)

now, the link on the other page will be written like the following:

<a href="pageurl.htm#content">Click Here</a>

change the pageurl.htm to the url of the page that has the text that you are linking to, and change the content to the name="" that you defined in the other page.

I hope you understand that.

- kiwee

Ryan Szablewski
04-18-2006, 01:49 AM
thank you very much, yes i understand and i will try it right now.

Ryan Szablewski
04-18-2006, 02:06 AM
excellent! thank you very much, now one more thing, is there a way where you can have it not underlined until it is clicked on from the other page... that way if no one clicked on it and they go to the page it isnt underlined...? or is that too far fetched for html? lol

pb&j
04-18-2006, 05:26 AM
try this...

<style type="text/css">
a {text-decoration:none;}
a:active {text-decoration:underline;}
a:visited {text-decoration:underline;}
</style>

kiwee
04-18-2006, 10:13 AM
(by the way, it is too far fetched for html, but what pb&j posted was CSS)