www.webdeveloper.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 21

Thread: Line break in title tag

  1. #1
    Join Date
    Mar 2012
    Posts
    15

    Line break in title tag

    Can I add a line break in a title, as called for below, after "HERE?"

    <img src="..test.jpg" "title="I want a line break HERE THIS should be on the lower line."/>

    Thanks. - Jim

  2. #2
    Join Date
    Nov 2007
    Posts
    409
    No you cannot.

    If you want formatting, you will need to use a tool tip of some sort. qTip is a nice relatively simple tool that I have used for this sort of thing.

  3. #3
    Join Date
    Jan 2004
    Location
    chertsey, a small town s.w. of london, england.
    Posts
    1,463
    Hi there jimRedfield,

    yes you certainly can.

    Try it like this...
    Code:
    title="I want a line break HERE&&#35;13;THIS should be on the lower line."
    The code has been tested in IE9, Firefox 13, Opera 11.62 and Safari 5.1.7.

    coothead

  4. #4
    Join Date
    Mar 2012
    Posts
    15

    Thanks for the code!

    napOleon - No harm, no foul re the wrong answer. ...I, of course, never make mistakes like that. :-)

    coothead - Thanks for the code - works like a charm.

    Do either of you know if additional formatting can be done to title tags? Things like a better spec for the box background color, corners, lines, etc.?

    Again, help appreciated. No need to respond if there's nothing to add. - Jim

  5. #5
    Join Date
    Jan 2004
    Location
    chertsey, a small town s.w. of london, england.
    Posts
    1,463
    Hi there jimRedfield,
    ...Do either of you know if additional formatting can be done to title tags?...
    To the best of my knowledge, no.

    As our friend nap0leon suggested, CSS tooltips would be the method to use.

    coothead

  6. #6
    Join Date
    Mar 2012
    Posts
    15
    Thanks again, again. Just what I needed to be pointed at. - Jim

  7. #7
    Join Date
    Jan 2004
    Location
    chertsey, a small town s.w. of london, england.
    Posts
    1,463
    No problem, you're very welcome.

  8. #8
    Join Date
    Nov 2007
    Posts
    409
    Wow - wonder when support for this started... It was a few years ago when I tried to do this and instead went with qTip.

    Learn new stuff every day!

  9. #9
    Join Date
    Nov 2012
    Posts
    7
    Tested this in IE, Chrome, Safari, Firefox (latest versions 2012-11-27):
    & #13; (Without space between & and #)

    Works in all of them...
    Last edited by MortenManden; 11-27-2012 at 07:43 AM.

  10. #10
    Join Date
    Sep 2006
    Location
    new york
    Posts
    266
    Interesting. Wonder if you can break down &&#35;13; or explain what it stands for? Looks like a special character &____; code inside another ?

  11. #11
    Join Date
    Jan 2004
    Location
    chertsey, a small town s.w. of london, england.
    Posts
    1,463
    Hi there auntnini,

    when I made that post on the 18th June the code was...
    &#13
    ...which is what MortenManden also suggested today.

    Since my post, the forums have gone through an upgrade and I can only assume that is the cause of &#35;13;

    coothead

  12. #12
    Join Date
    Sep 2006
    Location
    new york
    Posts
    266
    Thanks Coothead.

  13. #13
    Join Date
    Jan 2004
    Location
    chertsey, a small town s.w. of london, england.
    Posts
    1,463

    No problem, you're very welcome.


    coothead

  14. #14
    Join Date
    Nov 2012
    Posts
    3
    Quote Originally Posted by coothead View Post
    Hi there jimRedfield,

    yes you certainly can.

    Try it like this...
    Code:
    title="I want a line break HERE
THIS should be on the lower line."
    The code has been tested in IE9, Firefox 13, Opera 11.62 and Safari 5.1.7.

    coothead
    It is not working with me in Firefox 16 and Chrome 23. Any clue?

  15. #15
    Join Date
    Jan 2004
    Location
    chertsey, a small town s.w. of london, england.
    Posts
    1,463
    Hi there adamdani,

    and a warm to these forums.

    ...It is not working with me...
    Please read post #11 for an explanation as to why.


    coothead

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles