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

  • SEARCH
  • Home
  • 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 8238845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T19:56:56+00:00 2026-06-07T19:56:56+00:00

anyone know the custom css selector for dijit.MenuItem label? here’s the js that adds

  • 0

anyone know the custom css selector for dijit.MenuItem label?

here’s the js that adds the dijit.MenuItem’s:

dojo.forEach(basemapGallery.basemaps, function(basemap) {
        //Add a menu item for each basemap
        dijit.byId("bingMenu").addChild(new dijit.MenuItem({
            label: basemap.title,
            iconClass: basemap.title,
            onClick: function(){basemapGallery.select(basemap.id)}
        }));
}); 

here’s the static html:

<td align="center" style="width: 50px;" valign="middle">
        <button id="dropdownButton" iconClass="btnImgBaseMap" title="Switch Basemap" dojoType="dijit.form.DropDownButton">                    
            <div dojoType="dijit.Menu" id="bingMenu">
                <!--The menu items are dynamically created using the basemap gallery layers-->
            </div>
        </button>
</td>

thanks!!

  • 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-06-07T19:56:59+00:00Added an answer on June 7, 2026 at 7:56 pm

    Add a custom css class to the menu

    var w = dijit.byId("bingMenu");
    dojo.addClass(w.domNode, "myMenu");
    

    and use the following css

    .dijitMenu.myMenu .dijitMenuItem .dijitMenuItemLabel {
      color: white;   
    }
    

    Here’s an example:

    http://jsfiddle.net/cswing/GCBnF/

    If you need css that is unique per menu item, then add the custom class to the menu item

    var bingMenu = dijit.byId(...);
    var w = new dijit.MenuItem({
            label: basemap.title,
            iconClass: basemap.title,
            onClick: function(){basemapGallery.select(basemap.id)}
        });
    dojo.addClass(w.domNode, "bing");
    bingMenu.addChild(w);
    

    and use the following css

    .dijitMenu.myMenu .dijitMenuItem.bing .dijitMenuItemLabel {
       color: white;   
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Anyone know how to set the custom 404 Error pages that the Visual Studio
Does anyone know if its possible to turn off dreamweavers custom icons that it
Anyone know how to specify a custom record delimiter in a schema.ini file? I
Does anyone know how to modify the Wordpress canonical links to add a custom
Does anyone know how to check if the called ui (custom) has also options
I'm developing a custom wordpress blog theme. Does anyone know if there is a
Anyone know of a tutorial online that explains how to integrate alexbilbie CodeIgniter-OAuth-2.0-Server as
Anyone know how to add a custom option select filter to a jQuery DataTable?
Does anyone know if its possible to send out custom http REQUEST headers in
Anyone know how to get around this problem? I'm doing some custom button styling.

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.