Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7557767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T12:13:08+00:00 2026-05-30T12:13:08+00:00

I couldn’t find an answer anywhere on the Web, so I’m going to answer

  • 0

I couldn’t find an answer anywhere on the Web, so I’m going to answer my own question: How do I override the internal padding of the TooltipDialog popup?

The challenge:
When using dijit.TooltipDialog there is internal padding of 6px 8px 8px 6px assigned to the class dijitTooltipContainer from the Claro style sheet. I use several tooltips on the same page, and only wanted to remove this padding from one (thus, didn’t want to override the default stylesheet). This particular ToolTip contains a stylized unordered list of of right justified numbers from 0-100 in increments of 5, and the extra padding from dijitTooltipContainer was far too much.

Unfortunately, the following doesn’t work, only affecting the parent element (and making a mess of it at that):

var dialog = new dijit.TooltipDialog({
        content: string,
        style: "padding: 0;",
        id: "newDialog"
    },"");

The answer: Here’s how I changed the internal padding to 0 (using JavaScript):

// Create the ToolTip
var dialog = new dijit.TooltipDialog({
        content: string,
        id: "newDialog"
    },"");

// Open the popup
dijit.popup.open({
    around: "someNode",
    orient: ["below"],
    popup: dialog
});

// Remove the padding from dijitTooltipContainer
  // Get our main Widget node
  var mainNode = document.getElementById("newDialog");

  // Get all the child DIV nodes created by Dojo
  var divChildren = mainNode.getElementsByTagName("div");

  // Set the element padding to zero
  // dijitTooltipContainer is the first child node
  dojo.attr(divChildren[0], "style", {padding: "0px"});

Maybe someone else has a better way of doing this that is so obvious, I couldn’t find it. Hah.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T12:13:09+00:00Added an answer on May 30, 2026 at 12:13 pm

    When I work with Dojo, I setup a custom theme and use both the claro (or any other that is shipped) and my custom theme. I then setup any of these overrides in my custom theme.

    <body class="claro myTheme">
    

    So if I wanted to override all tooltips, I could have this in my css

    .myTheme .dijitTooltipContainer {
        padding: 0;
    }
    

    But you only want to override one, so you could do this

    // Create the ToolTip
    var dialog = new dijit.TooltipDialog({
        content: string,
        id: "newDialog"
    },"");
    dojo.addClass(dialog.domNode, 'noPadding');
    

    and the css

    .myTheme .noPadding .dijitTooltipContainer {
        padding: 0;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I couldn't find a straight answer to my question and need to know it
Couldn't find an answer to this question. It must be obvious, but still. I
I couldn't find any definitive answer to this question. I suppose most implementation use
I couldn't find the answer to this in any other question. Suppose that I
couldn't find similar posts, so posting my own question. I got variable array of
I couldn't find any useful information on Microsoft's site, so here is the question:
I couldn't find an answer - does NHibernate supports MsSql2008? For example - can
I couldn't find a suitable title for this. I'm going to express my query
Couldn't find similar enough question so I'll ask. I'm trying to use facebook log-in
Couldn't find this anywhere, maybe I'm looking for the wrong verbs. I'm trying to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.