Results 1 to 2 of 2

Thread: Problem with Image "alt" tag

  1. #1
    Join Date
    Feb 2005
    Posts
    6

    Problem with Image "alt" tag

    For the life of me I can not figure out why the "alt" text does not show up on my images when you mouse over them. The website is: www.rookaps.com

    Here is an example of how I coded throughout the site:

    <div style="position:absolute;left:461;top:86;width:197;height:26;">

    <img src="rookaps001006.gif" title="" alt="Replace Your Lost Flash Drive Cap" align="top" border="0" vspace="0" hspace="0">

    </div>

    Help... am I missing something?

  2. #2
    Join Date
    Feb 2006
    Location
    Salisbury UK
    Posts
    4,332
    The text in the yellow box does show if you use title="image text" (you have title="" but no text inside). I downloaded your page and rookaps001008.gif to test.

    Alt should show the text in IE but never in Firefox if you had a doctype, but as you haven't got a doctype it isn't even showing in IE.

    Firefox is probably correct because it is not required to show the text on hover if the image shows, it is there to show if the image fails to load. In Firefox and most browsers even if the image shows you should be able to see the alt text by right-clicking the image and looking at the properties.

    If you want the alt text to show in Firefox when just hovering over the image, add title="image name" as well as alt="..." as in <img src="image.jpg" alt="image name" title="image name"> In your case without a doctype this will make it appear in IE too.
    Code downloaded to my PC will be deleted in due course.
    WIN7; IE9, Firefox, Opera, Chrome and Safari for Windows; screen resolution usually 1366*768.
    Also IE6 on W98 with 800*600 and IE8 on Vista 1440*900.

Similar Threads

  1. Image Centering Problem
    By acidvisor in forum Web Design, HTML Reference and CSS
    Replies: 1
    Last Post: 16 Jan 2007, 03:18 AM

Posting Permissions

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