Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Internet & the Web (https://www.askmehelpdesk.com/forumdisplay.php?f=177)
-   -   Can I put a named anchor tag at an image location? (https://www.askmehelpdesk.com/showthread.php?t=36609)

  • Oct 11, 2006, 11:41 AM
    NeedKarma
    Can I put a named anchor tag at an image location?
    Something like this:

    Code:

    <A name="NKmessage"><IMG alt="" src="/xxxx/Gord.jpg"> </A>
    Or do you absolutely have to have text in the anchor tag?
  • Oct 11, 2006, 12:25 PM
    Roel Zylstra
    Sure you can use "name" in an anchor tag without anchor text, but if you don't use href then some older browsers may not react to a # href within another link.
  • Oct 11, 2006, 03:25 PM
    NeedKarma
    I tried it using IE and when I try the url that has the "#NKmessage" at the end I simply end up at the top of the page.
  • Oct 16, 2006, 09:50 AM
    LTheobald
    The two lines of :
    Code:

    <a name="img"><img src="something.jpg" alt="something"></a>
    And then

    Code:

    <a href="#img">Back to image</a>
    Worked for me in IE 7, Firefox and whatever the internal browser in HTML Kit is based on.
  • Oct 16, 2006, 09:56 AM
    NeedKarma
    I'll try that. Thanks.
  • Oct 16, 2006, 11:08 AM
    NeedKarma
    Works like a charm. Thanks Guys!

  • All times are GMT -7. The time now is 08:55 AM.