Title attribute

Discussion in 'HTML' started by Fabri, Jul 4, 2005.

  1. Fabri

    Fabri Guest

    I guess if it is possible to write a multiline title attribute natively
    with HTML + CSS.

    GMail does it and I don't know how.

    <div title="first line[\n doesn't work]second line">My Div</div>

    Any help appreciated.

    Regards.

    --
    Fabri
    ("Sono più di 30 punti...ma è come se fossere 8 o 9....")
    Fabri, Jul 4, 2005
    #1
    1. Advertising

  2. Fabri

    Arne Guest

    Once upon a time *Fabri* wrote:

    > I guess if it is possible to write a multiline title attribute natively
    > with HTML + CSS.
    >
    > GMail does it and I don't know how.
    >
    > <div title="first line[\n doesn't work]second line">My Div</div>
    >
    > Any help appreciated.
    >
    > Regards.
    >


    I belive you must use Javascript for that.

    --
    /Arne

    Top posters will be ignored. Quote the part you
    are replying to, no more and no less! And don't
    quote signatures, thank you.
    Arne, Jul 4, 2005
    #2
    1. Advertising

  3. Fabri <> wrote:

    > I guess if it is possible to write a multiline title attribute
    > natively with HTML + CSS.


    Of course. In HTML, a line break is permitted inside an attribute
    value. CSS has nothing to do with this.

    What you probably mean, though, is whether you can make browsers
    _display_ an attribute value in two (or more) lines with a line break
    in a particular position. The answer is that by the specifications you
    cannot, though some browsers incorrectly treat a line break as in
    title="first line
    second line"
    as requesting a line break in output, not as equivalent to a space, as
    the specifications say.

    > Any help appreciated.


    When in a dead end, backtrack. What was the reason for your wish to
    display a title attribute in two lines? It probably indicates a wrong
    idea of the attribute. It is an "advisory title" - basically, something
    that the user might or might not hear or see and that might sometimes
    help her, but it should not contain anything that users _must_ know.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
    Jukka K. Korpela, Jul 4, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andreas Klemt
    Replies:
    1
    Views:
    445
    Steve C. Orr, MCSD
    Aug 10, 2003
  2. Replies:
    0
    Views:
    512
  3. Replies:
    1
    Views:
    530
    David
    Apr 24, 2007
  4. rote
    Replies:
    5
    Views:
    920
  5. soonic
    Replies:
    11
    Views:
    1,766
    soonic
    Jul 27, 2011
Loading...

Share This Page