locked
New Line In Tool Tip RRS feed

  • Question

  • User-1137493631 posted
    HTML Source EditorWord wrap

    Hi Friends,
    This is very simple article to show the tooltip wit new line
    When you make a new line tool tip. Just you have to write a text in title attribute, with enter key. Then you can get the new line.

    Here is the sample code for to do that

    <table style="width: 189px; border-right: #0033ff 2pt solid; border-top: #0033ff 2pt solid; border-left: #0033ff 2pt solid; border-bottom: #0033ff 2pt solid;">
                <tr title="This is First Line .
                 this is second Line">
                    <td style="border-right: #cc0033 1pt solid; border-top: #cc0033 1pt solid; border-left: #cc0033 1pt solid; border-bottom: #cc0033 1pt solid; background-color: gray">
                        Name</td>
                    <td style="border-right: #cc0033 1pt solid; border-top: #cc0033 1pt solid; border-left: #cc0033 1pt solid; border-bottom: #cc0033 1pt solid; background-color: gray">
                        Id</td>
                    <td style="border-right: #cc0033 1pt solid; border-top: #cc0033 1pt solid; border-left: #cc0033 1pt solid; width: 73px; border-bottom: #cc0033 1pt solid; background-color: gray">
                        Place</td>
                </tr>
                <tr>
                    <td>
                        Mr.X</td>
                    <td>
                        001</td>
                    <td style="width: 73px">
                        INDIA</td>
                </tr>
                <tr>
                    <td style="height: 21px">
                        Mr.Y</td>
                    <td style="height: 21px">
                        002</td>
                    <td style="width: 73px; height: 21px">
                        INDIA</td>
                </tr>
            </table>


     

    When mouse over the Name filed you can get the result
    Name Id Place
    Mr.X 001 INDIA
    Mr.Y 002 INDIA
    Wednesday, April 9, 2008 1:49 AM

All replies

  • User1805008792 posted

    Hi Thirumaran,

    I don't think that will work in all browsers(I am not sure whether it will work in any). here is a very good article on this topic -

    http://modp.com/wiki/htmltitletooltips


     

    Wednesday, April 9, 2008 6:12 AM
  • User-1137493631 posted

    Very nice article akjoshi!

    Wednesday, April 9, 2008 10:40 AM
  • User1169944652 posted

    Very nice article !!

    Thank u

    Monday, April 14, 2008 5:33 AM
  • User-1430006131 posted

    Yes,

    it's working in my application .

    Thanks Thirumaran

    Friday, April 18, 2008 2:57 AM
  • User845932231 posted
    It will not work in Firefox
    Saturday, April 26, 2008 1:16 AM
  • User1923880652 posted

     There is very nice DHTML tooltip solution whihc I have check in  IE,FF,Safari.

    http://www.walterzorn.com/tooltip/tooltip_e.htm 

    Tuesday, May 13, 2008 3:40 AM
  • User-1153634786 posted


                <tr title="This is First Line .
                 this is second Line">
      

    You may do it also from code behind:

    If  ....  Then

    Return "<td title='Hello " & System.Environment.NewLine & " World'>&nbsp</td>"

    End If



    Tuesday, March 9, 2010 3:16 AM
  • User-1392959185 posted

    Try with Jquery tool tip. Typically Tooltip should be fast loading but table will take time to render.

     

    Tuesday, March 9, 2010 3:26 AM