• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

HTML alt text

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    HTML alt text

    Can find nowt on net but maybe soemone knows different. Is there any way to enlarge the text specified in the alt tag for an image???

    Ta for any answers.
    bloggoth

    If everything isn't black and white, I say, 'Why the hell not?'
    John Wayne (My guru, not to be confused with my beloved prophet Jeremy Clarkson)

    #2
    No - you'll need to use one of the many JavaScript 'tooltip' scripts available to get the effect you require.

    Comment


      #3
      Oh well, it is an interactive in jscript so adding another popup box will be trivial anyway. Cheers!
      bloggoth

      If everything isn't black and white, I say, 'Why the hell not?'
      John Wayne (My guru, not to be confused with my beloved prophet Jeremy Clarkson)

      Comment


        #4
        Originally posted by xoggoth View Post
        Can find nowt on net but maybe soemone knows different. Is there any way to enlarge the text specified in the alt tag for an image???

        Ta for any answers.
        As other have said, JS is the only way to do large-text tooltips. Use a library like JQuery or YUI to save yourself too much mucking about and get out-of-the-box cross-browser compatibility.

        BTW, the "alt" text is only displayed by IE, and IE is wrong to do so - you should be using the "title" attribute if you want tooltips to appear. The "alt" attribute is only supposed to be shown as a placeholder if the image can't be displayed, or to be (e.g.) read out by assistive technologies such as screen readers used by visually impaired users, whereas the "title" attribute is specifically for the purpose of being displayed in addition to the image (via a tooltip, for example).

        So if you have any situation that relies on a tooltip appearing, use "title" for it or it won't work in Firefox, Opera, Safari, Konqueror, or indeed any other proper browser, as opposed to the appalling heap of bug-ridden rubbish that Microsoft have been forcing on the world.

        Note that IE will (correctly, and in the same way as all other browsers) show the "title" in preference to the "alt" text, if both are present. This means that you can have a short tooltip using "title", while using alt for slightly longer text that would be too much for a tooltip, but is of greater help to assistive technology users; e.g.

        <img src="banana.gif" title="Banana" alt="An anthropomorphised banana dancing from side to side with a gleeful expression on its face">

        will show "Banana" in the tooltip, but a blind user would get a useful description of what they couldn't see.

        Comment


          #5
          Originally posted by NickFitz View Post
          As other have said, JS is the only way to do large-text tooltips. Use a library like JQuery or YUI to save yourself too much mucking about and get out-of-the-box cross-browser compatibility.

          BTW, the "alt" text is only displayed by IE, and IE is wrong to do so - you should be using the "title" attribute if you want tooltips to appear. The "alt" attribute is only supposed to be shown as a placeholder if the image can't be displayed, or to be (e.g.) read out by assistive technologies such as screen readers used by visually impaired users, whereas the "title" attribute is specifically for the purpose of being displayed in addition to the image (via a tooltip, for example).

          So if you have any situation that relies on a tooltip appearing, use "title" for it or it won't work in Firefox, Opera, Safari, Konqueror, or indeed any other proper browser, as opposed to the appalling heap of bug-ridden rubbish that Microsoft have been forcing on the world.

          Note that IE will (correctly, and in the same way as all other browsers) show the "title" in preference to the "alt" text, if both are present. This means that you can have a short tooltip using "title", while using alt for slightly longer text that would be too much for a tooltip, but is of greater help to assistive technology users; e.g.

          <img src="banana.gif" title="Banana" alt="An anthropomorphised banana dancing from side to side with a gleeful expression on its face">

          will show "Banana" in the tooltip, but a blind user would get a useful description of what they couldn't see.



          Because IE is intelegent enough to detect that you have omitted the title, so will display the alt text as a title as this may be some use to the user.


          HTH
          Last edited by r0bly0ns; 27 February 2008, 20:16. Reason: IE may be smart, but I'm not

          Comment


            #6
            Originally posted by r0bly0ns View Post

            Because IE is intelegent enough to detect that you have omitted the title, so will display the alt text as a title as this may be some use to the user.


            HTH

            Because the IE team didn't follow the specifications, produced a buggy implementation, and have ever since refused to correct it because some people who don't know anything about HTML have come to rely on it.

            HTH



            (Oh, and intelligent )

            Comment


              #7
              How is it a bug?


              You said yourself that if the title tag is there, IE displays it.


              EDIT:

              Just read the link you posted and nowhere in the specification for alt text does is say that the alt text attribute should not be used as a title if the title is not present.
              Last edited by r0bly0ns; 27 February 2008, 21:15.

              Comment


                #8
                The point is that Alt is designed to display some text to the user when they cannot load the picture. You may not want to set a tool tip, but IE forces you to have one anyway.

                IE is a pain in the arse bug ridden POS, IE6's amazing rendering of some CSS stuff also leaves a lot to be desired.

                Comment


                  #9
                  Originally posted by Ardesco View Post
                  The point is that Alt is designed to display some text to the user when they cannot load the picture. You may not want to set a tool tip, but IE forces you to have one anyway.

                  IE is a pain in the arse bug ridden POS, IE6's amazing rendering of some CSS stuff also leaves a lot to be desired.
                  Yeah - bring back Netscape 4.x; now there was a browser that worked
                  If she weighs the same as a duck, she's made of wood. And therefore a witch!

                  Comment


                    #10
                    thx

                    #4 NickFitz. Many thanks chappy - I'd used the alt and title attributes previously without ever realising the difference. Your post cleared it all up for me. Brilliant!
                    Speaking gibberish on internet talkboards since last Michaelmas. Plus here on Twitter

                    Comment

                    Working...
                    X