Click to See Complete Forum and Search --> : links
pipefish
12-18-2002, 10:44 AM
I am trying to prove that you can teach an old dog new tricks by teaching myself html at the age of 70.
My proposed web site has several pages.
The main page has text and other pages have images in the form of a series of tables where successive images appear to the left and the right.
I have set up links from the text page to the image pages but cannot find out how to link to a specific image rather than just the page.
Is this possible using tables and if so how do I do it please?:confused:
I'm not sure exactly what you mean, but if you want to link directly to an image this is the code you use <a href="img.jpg">open image</a>
If that isn't what you want, explain further, and we'll get you going...
pipefish
12-18-2002, 01:50 PM
Pyro,
Thanks for the reply which does not seem to be what I want.,
although I may be misunderstanding you.
I have a page called MAIN TANK.html and have added a link to the page called EQUIPMENT.html as follows
<A HREF="EQUIPMENT.html">closed loop<A>
This link takes me to the page Equipment but not to the specific image "closed loop" which is one of many images on that page. I want the link to go directly to the image concerned to save the reader having to scroll through a whole page and losing interest.
What other code should I be adding?
spufi
12-18-2002, 02:56 PM
First of all, it's considered a good habit to give all of your HTML pages names in lower case.
Second, create a anchor by where you want the link to go to, ie <a name="closedloop"><img src="closedloop.jpg" alt=""> When you want to link to that specific area, use this as the link <a href="equipment.html#closedloop">Closed Loop</a>
Stefan
12-18-2002, 03:48 PM
Originally posted by spufi
Second, create a anchor by where you want the link to go to, ie <a name="closedloop"><img src="closedloop.jpg" alt="">
In most browsers you don't need to nest things in <a></a>.
Eg <img id="closedloop" ...
should work just as well.
spufi
12-18-2002, 06:46 PM
Just after I posted, I thought what I typed was incorrect, or at least slightly wrong. I didn't have time to double check it. When I tried to do something like it before it didn't work. A book showed it as how I posted it, and it worked. Granted it was the name attribute. I'll see if it works with the id one instead.
pipefish
12-19-2002, 01:33 AM
Many thanks I will try that.
:)
pipefish
12-19-2002, 04:59 AM
Again, many thanks.
I tried it and it worked a treat:D :D :D