|
|
|
|
![]() ![]() |
Nov 30 2005, 12:03 PM
Post
#1
|
|
|
Premium Idiot Group: [HOSTED] Posts: 661 Joined: 9-July 05 From: Switzerland, but currently in Pakistan Member No.: 6,943 |
How can I insert an alt txt caption for a text link, so that when they hover over the text it pops up with more info about the link before the person clicks on it?
Do I have to use an image map over the text for that, or is there a simple function that does the trick? This post has been edited by miCRoSCoPiC^eaRthLinG: Nov 30 2005, 04:43 PM |
|
|
|
Nov 30 2005, 12:58 PM
Post
#2
|
|
|
S.P.A.M.S.W.A.T. Group: Members Posts: 814 Joined: 22-January 05 From: San Antonio, Texas (No, I'm not dumb. I just moved here...) Member No.: 2,284 |
That is not called an alt text. You should use the "title" attribute to make a roll-over tooltip text thing. For example:
CODE <a href="somepage.htm" title="Click to see this page!!!">Somepage</a> Would give you a link that says "Somepage". It links to somepage.htm. When you roll over it, it would show a little box saying "Click to see this page!!!" (Of course, without quotes). The alt attribute displaying a tooltip text is just a bug in Internet Explorer. If you want the tooltip to show up on almost any browser, like Firefox and Netscape, you would have to use the standard one, title. |
|
|
|
Nov 30 2005, 01:27 PM
Post
#3
|
|
|
Bursting with vegany goodness! Group: Members Posts: 342 Joined: 8-April 05 From: Norwich, UK Member No.: 3,753 |
Wow! I always wondered how people did this on thier web pages... I always thought it was javascript or something, I didn't realise it was this simple!
|
|
|
|
Nov 30 2005, 06:50 PM
Post
#4
|
|
|
Premium Idiot Group: [HOSTED] Posts: 661 Joined: 9-July 05 From: Switzerland, but currently in Pakistan Member No.: 6,943 |
thanks. i realize i worded the question wrong. but i didn't know how to put it. Simple answers like that make me feel like such a dummy.
|
|
|
|
Dec 19 2005, 08:08 AM
Post
#5
|
|
|
Member [ Level 1 ] Group: Members Posts: 45 Joined: 12-December 05 From: IJsselstein Netherlands Member No.: 10,088 |
Alt is for pictures, when you put your mouse on it.
If you want to use this, you only have to write in the tag alt="the text" between the image src tag. Mark |
|
|
|
Feb 13 2006, 06:29 AM
Post
#6
|
|
|
Advanced Member Group: Members Posts: 185 Joined: 15-November 05 From: Inland from the Left Coast of Canada Member No.: 9,627 |
Alt is for pictures, when you put your mouse on it. If you want to use this, you only have to write in the tag alt="the text" between the image src tag. Mark Actually, Alt= was intended to be a label for displaying when the picture is unable to display in all Browsers. Title= is the w3c recommended property for text labels. However, Internet Exploder uses the Alt tag for tool tips. The more compliant Browsers use title= to do the same thing. There is an extension for Firefox/Mozilla which will recognize the Alt= tag when the title tag is missing. Not sure if any other current Browsers also have extensions for them to do the same. For the best results, use both the title= and the alt=, then you avoid the Browser dependency issue. Notice from jlhaslip:
Yippee! An Edit button...
This post has been edited by jlhaslip: Feb 13 2006, 06:34 AM |
|
|
|
Apr 23 2006, 03:38 AM
Post
#7
|
|
|
Super Member Group: [HOSTED] Posts: 750 Joined: 8-April 06 From: Lima - Peru Member No.: 12,579 |
How can I insert an alt txt caption for a text link, so that when they hover over the text it pops up with more info about the link before the person clicks on it? Do I have to use an image map over the text for that, or is there a simple function that does the trick? You have some options, you can Use the title attribute of the anchor tag, or you can Use a javascript fUnction or you can use only css too. Try to do not use the alt atribute because it is for images basically and not work in some browsers. In the web exists a lot of examples of this. best regards |
|
|
|
Apr 23 2006, 02:27 PM
Post
#8
|
|
|
Advanced Member Group: Members Posts: 185 Joined: 15-November 05 From: Inland from the Left Coast of Canada Member No.: 9,627 |
as mentioned in another topic here, this technique works well to "standardize" tool tips between browsers since each browser handles them a bit differently for allowable length, etc. Uses pure CSS instead of scripting and is fully customisable for colours, size, location, etc.
Tooltip Alternative Method *edit for typos* This post has been edited by jlhaslip: Aug 30 2007, 03:57 AM |
|
|
|
Feb 11 2008, 11:32 AM
Post
#9
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 0 Joined: 1-November 07 Member No.: 25,869 |
How to customize tooltip width and height, which uses title attribute of anchor(a) tag
Alt Txt Tooltip Popups Over Text Links, How To Do? Hi, Please tell me how can I customize the width and height of the tooltip box being displayed if we keep mouse over link where the "title" attribute is specified as tooltip. <a href="somepage.Htm" title="This is the tooltip text I want to change the height and width!">Somepage</a> Thanks in advance -shamjith |
|
|
|
Feb 13 2008, 02:34 PM
Post
#10
|
|
|
Super Member Group: [HOSTED] Posts: 660 Joined: 12-July 06 From: Ontario, Canada Member No.: 14,464 |
The title attribute creates ToolTip/rollover text on almost any element. The alt attribute is valid on <img /> elements and is to specify alternate text which is used if the picture is not loaded, if it is a screen reader, etc.
JavaScript can also be used to do this with onmouseover, but I do not see a reason why. CSS can also be used for the hover pseudo-class so that a special effect can be created with the test. |
|
|
|
![]() ![]() |
Similar Topics
| Topics | Topics | |
|---|---|---|
|
|
|
|
Lo-Fi Version | Time is now: 8th September 2008 - 05:52 AM |