SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: title & alt

  1. #1
    SitePoint Enthusiast
    Join Date
    May 2006
    Location
    Australia
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    title & alt

    I use the lightbox script on my site & just noticed a difference between how firefox and ie display title and alt tags.

    In firefox the title tag seems to display over the alt tag (which is a problem, as in the below example it displays the full title + the code i use to link to a larger res image), whereas ie displays the "click to view" alt tag that i've coded.






    Code:
    			<a class="opacityfilter" href="finepoint/bifurcate.jpg" rel="lightbox"
    			title="bifurcate<br />&lt;a href=&quot;finepoint/bifurcate_large.jpg&quot;&gt;load high res version &raquo;&lt;/a&gt;">
    		    <img src="finepoint/bifurcate_thumb.gif" alt="click to view" width="84" height="100" class="leftimg"/></a>

    The text within the yellow border is the text that is in the title tags.

    Can i control what's happening here? cause the link within my title is important, but i don't want it to display like that in firefox on mouseover instead of the alt tag.

    cheers

  2. #2
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,424
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    IE handles alt tags wrong. They should never be displayed unless images are turned off in a browser. Title tags should be displayed and is handled properly by every other browser.

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2006
    Location
    Australia
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok, but is there a way of achieving the option of a link to a high res image that doesn't display in the title tag?

  4. #4
    Non-Member Egor's Avatar
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    7,305
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Hi there,

    Have you actually looked at the code you posted? It's a mess and doesn't make any sense. You can't stick HTML tags in a title attribute.

    I would go back to the original script code, and start again.
    Last edited by Egor; Jun 25, 2006 at 16:00.

  5. #5
    SitePoint Enthusiast
    Join Date
    Mar 2006
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It does make sence. This is taken from the lightbox site --->


    Can I insert links in the caption?
    Yes, but you need to convert quotes and greater and less than symbols into their html entity equivalents. For example:
    <a href="images/image-4.jpg" rel="lightbox" title="&lt;a href=&quot;link.html&quot;&gt;my link&lt;/a&gt;">Image</a>


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •