Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Senior Coder
    Join Date
    Jun 2002
    Location
    Nashua, NH
    Posts
    1,724
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Attribute title="some text"

    The value of the title attribute is rendered by most visual browsers as a tool tip. Is there a way to change the style and behaviour of this tool tip (say I want it to appear immideately, have black background and white text). I looked into it but could not find any info.

    Please, do not post the links to custom tooltip scripts. The reason I'm asking this question is that I developed my own script (can be found here ).
    I want to make sure that the statement "currently browsers do not allow to customize the behaviour and appearance of tool tips" is correct.

    Thanks
    Last edited by Vladdy; 07-11-2002 at 09:39 PM.
    Vladdy | KL
    "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"

  • #2
    New Coder
    Join Date
    Jul 2002
    Location
    USA, East Coast
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    older browser no, that is correct

    NS 4.x types etc wont allow you to change a popup "tooltip".

    As far as the latest and greatest on NS6/7 or IE 6 I dont know for sure.

    It would seem the IE side of things might allow some customization.

    But making your own layer popup/hide, is probably the only stable way to do a tool tip.

    -S. Bob

  • #3
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    To my knowledge, you can't change the behavior of the tooltip in any browser without some of your own effects.

    Gecko would make it easy to implement your own version of title:

    *[title] {
    -moz-binding: url(mytitle.xml#title);
    }

    And then you could write a binding that copies the title text, removes the attribute (prevents default behavior from happening), then popping up an appropriate layer.

    It would be slightly more complicated to make it as transparent in IE (actually, you would have to use * { behavior: url(bla.htc); } and check for the title attribute, but this becomes less transparent as any other element with an assigned behavior would get wiped out).

    But for your original question - I'd love to be proven wrong, but I'm pretty sure.

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    Nashua, NH
    Posts
    1,724
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, jkd.

    As I said I finished the implementation of tool tips for DOM compliant browsers and just wanna make sure that I state correctly that default browser tool tip is not customizable.
    Vladdy | KL
    "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"

  • #5
    Regular Coder
    Join Date
    Jun 2002
    Location
    The Netherlands
    Posts
    217
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Those tooltips cant be customized because they are just the default system tooltips,which cant be fully customized (although real applications can change the way they look)

  • #6
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Well, if you have nothing against XUL (taken from XULPlanet tutorial):

    Code:
    <?xml version="1.0"?>
    
    <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
    
    <window
      id="example-window" title="Example 5.3.2"
      xmlns:html="http://www.w3.org/1999/xhtml"
      xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
    
      <button label="Save" tooltiptext="Click here to save your stuff"/>
    
    <tooltip id="moretip" orient="vertical" style="background-color: #33DD00;">
      <description value="Click here to see more information"/>
      <description value="Really!" style="color: red;"/>
    </tooltip>
    
    <button label="More" tooltip="moretip"/>
    
    
    </window>
    But I don't believe you could migrate that to any HTML/XHTML document.
    Last edited by jkd; 07-11-2002 at 08:37 PM.


  •  

    Posting Permissions

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