• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 300
  • Last Modified:

Need help figuring out java script for bubbletip posted by Google.

Hello, I need a Java script Expert to help me out. Basically I am using Java Script and html to create a popup tooltip/baloon.

I am using this code posted by google :

Everything works well, however I need to be able to specifiy the width of the bubbletip, and I can't figure it out how to do that by looking at the Java Script code displayed at the URL posted.

In the code their is an options parameter that can be used to customize the tooltip. Yet nothing I can see about specifiying the width. Can someone take a look at this Java Script and figure out how to specify the width of the tooltip? Also I don't know how to specify a hard return for the text to be  displayed. However the width problem is my most urgent priority.

Here is an example of  how they are able to specifiy the tooltip options, for an actual code snippet. Yet, as I mentioned before, there is nothin I can see about sizing the tooltip.
     deltaDirection: 'down',
     deltaPosition: 50,
     offsetTop: 20 })
  • 2
1 Solution

First, try to use container element around your content.
For example, you can set the width of #tip1_down.
brgdotnetcontractorAuthor Commented:
I have no idea how to set the width. So I need help and maybe an example from someone who knows Java Script.
You can do this with CSS or with inline styles:

<div id="tip1_down" style="display: block; width: 500px;">Content</content>

Open in new window

<!-- CSS -->
<style type="text/css">
  .bubble { display: block; width: 500px; }

<!-- HTML -->
<div id="tip1_down" class="bubble">Content</content>

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now