Loading ...
Sorry, an error occurred while loading the content.

Tooltips after 2.3.0 Upgrade

Expand Messages
  • brendangibson
    I upgraded our YUI from 2.2.2 to 2.3.0 and noticed that my tooltips no longer work as before. Now the tooltip is so big that it stretches out of the screen and
    Message 1 of 2 , Aug 30, 2007
    • 0 Attachment
      I upgraded our YUI from 2.2.2 to 2.3.0 and noticed that my tooltips no
      longer work as before.

      Now the tooltip is so big that it stretches out of the screen and I
      can't see the text. Previously the tooltip stretched to the size of
      the text within it.

      I have tried adding a width attribute to the call, but that sets the
      tooltip to a fixed width, which I don't want. I have tried values of
      '100%' and 'auto' as well, but they don't do what I want.

      From the README:

      + YAHOO.widget.Tooltip instances without a value specified for the
      "width"
      configuration property will be rendered at a width equal to the
      offsetWidth
      of their root <DIV/> element to prevent their width from being
      clipped or
      constrained by their parent HTML element.

      I don't really understand this bit...

      How do I setup my tooltips so that their widths are dependent on their
      contents?
    • Caridy PatiƱo Mayea
      Hi, The mark-up of the tooltip control has changed in the YUI 2.3.0, mainly for the shadow and the rounded corners. That s why you need to change the CSS s
      Message 2 of 2 , Sep 1, 2007
      • 0 Attachment
        Hi,

        The mark-up of the tooltip control has changed in the YUI 2.3.0,
        mainly for the shadow and the rounded corners. That's why you need to
        change the CSS's rules.

        The new mark-up:

        <div class="yui-module yui-overlay yui-tt">
        <div class="bd">text here...</div>
        <div class="yui-tt-shadow yui-tt-shadow-visible"></div>
        </div>

        The correct CSS rule must be:

        .yui-tt .bd {
        color: #000;
        background-color: #FFEE69;
        width: 250px; /* auto by default */
        font-size: 100%;
        }

        That's all...

        Best Regards,
        Caridy (caridy at gmail.com)
        http://www.bubbling-library.com/


        --- In ydn-javascript@yahoogroups.com, "brendangibson"
        <brendangibson@...> wrote:
        >
        > I upgraded our YUI from 2.2.2 to 2.3.0 and noticed that my tooltips no
        > longer work as before.
        >
        > Now the tooltip is so big that it stretches out of the screen and I
        > can't see the text. Previously the tooltip stretched to the size of
        > the text within it.
        >
        > I have tried adding a width attribute to the call, but that sets the
        > tooltip to a fixed width, which I don't want. I have tried values of
        > '100%' and 'auto' as well, but they don't do what I want.
        >
        > From the README:
        >
        > + YAHOO.widget.Tooltip instances without a value specified for the
        > "width"
        > configuration property will be rendered at a width equal to the
        > offsetWidth
        > of their root <DIV/> element to prevent their width from being
        > clipped or
        > constrained by their parent HTML element.
        >
        > I don't really understand this bit...
        >
        > How do I setup my tooltips so that their widths are dependent on their
        > contents?
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.