SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    $books++ == true matsko's Avatar
    Join Date
    Sep 2004
    Location
    Toronto
    Posts
    795
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Multiline Title Tooltips in Firefox

    The following element summons a browser tooltip to show up when the mouse is placed over it

    Code:
    <a href="#" title="something useful">Link</a>
    But when a line breaks are included into the title attribute, the effects work in IE but not in FireFox

    Code:
    <a href="#" title="something
    useful">Link</a>
    Is there any way to get it to work in FF? Or is it just another one of Microsoft's esoteric browser innovations?
    I can't believe I ate the whole thing

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    According to the HTML4 specification, this is how user agents should deal with CDATA attribute values:
    • Replace character entities with characters,
    • Ignore line feeds,
    • Replace each carriage return or tab with a single space.

    In theory, you could include a line-feed into your attribute value using an NCR:
    HTML Code:
    <a href="#" title="Something&#38;#10;useful">Link</a>
    There's no guarantee that it will work, though.
    Birnam wood is come to Dunsinane

  3. #3
    SitePoint Member
    Join Date
    Feb 2010
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi all,

    Did you ever find a solution? I am facing the same problem, three years later.


    Grae

  4. #4
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    There is not a problem in the first place with Firefox; it is NOT supposed to cause a linefeed like was stated by Tommy, it is a bug in M$IE.

    Furthermore Authors should not declare attribute values with leading or trailing white space in the first damn place so you should never do it anyway.


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
  •