SitePoint Sponsor

User Tag List

Results 1 to 12 of 12

Thread: "hint" links?

  1. #1
    011110010110000101111001 jabird's Avatar
    Join Date
    Aug 2004
    Location
    U.S.
    Posts
    593
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    "hint" links?

    Has anyone seen those nifty little hint links, that when you hover over them, a caption pops up under your cursor telling you what it means... like if someone did this to PHP, when the hovered over it, it would say "Hypertext Pre-Processor". Most of the times when I notice these they usually have dashed underlining.

    Can someone tell me how to do this?
    ~Jabird
    Jabird.com
    If I were binary... I'd be all 1's for you.
    BBCode trouble?

  2. #2
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Look at the <acronym> tag.
    Aaron Brazell
    Technosailor



  3. #3
    011110010110000101111001 jabird's Avatar
    Join Date
    Aug 2004
    Location
    U.S.
    Posts
    593
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ah, thank you
    ~Jabird
    Jabird.com
    If I were binary... I'd be all 1's for you.
    BBCode trouble?

  4. #4
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Don't forget to look at <abbr> either.

    In fact, you can put a title attribute on almost any element type to achieve this effect in most modern browsers. If there's no semantically suitable element type, you can always use SPAN.

    You may need some CSS to get the dashed border as a visual clue in IE:
    Code:
    .help {border-bottom: 1px dashed #000}
    HTML Code:
    <span class="help" title="Tooltip text">text</span>
    (IE doesn't do dotted 1px borders for some reason, they become dashed.)
    Birnam wood is come to Dunsinane

  5. #5
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just use the title attribute on the suitable element (acronym, abbr, span, or whatever).
    Simon Pieters

  6. #6
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    IE6 doesn't support <abbr>, so I use <span>s instead. I don't know if they plan to add it to IE7. I hope they do.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  7. #7
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Aaron Brazell
    Technosailor



  8. #8
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    LOL I read that the night that was posted. I guess I've had a lot on my mind. Thanks Sketch.

    I wonder why they didn't add support for <abbr> when they added support for <acronym>... maybe <abbr> was added to the HTML4 spec after <acronym>...
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  9. #9
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Microsoft came up with ACRONYM and Netscape with ABBR, if I recall correctly. They both meant the same thing. Then the W3C incorporated both element types into HTML 4, but used a slightly different meaning for ACRONYM. Microsoft were peeved about this, and childishly refused to support ABBR just to spite.

    At least that's my understanding of history.
    Birnam wood is come to Dunsinane

  10. #10
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Heh. That's Microsoft for you.

    Not all abbreviations are acronyms though, and some people consider initialisms to be different from acronyms.

    Thanks Tommy.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  11. #11
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, that's what the W3C wanted to differentiate between (I think, they're rather ambiguous about it). Americans call initialisms 'acronyms,' whereas we in the civilised part of the world are more specific: an acronym is an abbreviated form that can be pronounced as a word.
    Birnam wood is come to Dunsinane

  12. #12
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey! I'm an American and I know the difference.

    It's too bad dictionary.reference.com and m-w.com don't note the difference.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.


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
  •