Measurement Widget

913
8
Jump to solution
07-31-2014 11:53 AM
jaykapalczynski
Frequent Contributor

I am using the example for the measure widget  Measurement | ArcGIS API for JavaScript

I am taking it out of the Title pane and setting the color to white.  ALTHOUGH the text on the drop down that denotes (Acres, Sq Ft etc) stays BLACK

How can I change that drop down text to WHITE

Thoughts?

<div id="measurementDiv"></div>

<span style="font-size:smaller;padding:5px 5px;">Press <b>CTRL</b> to enable snapping.</span>

#measurementDiv{

  color: white;

}

measure.jpg

0 Kudos
1 Solution

Accepted Solutions
KenBuja
MVP Esteemed Contributor

If I ever want to see the css and html for an object, I use Chrome's Developer tool called "Inspect Element" by right-clicking on an object.

In the example below, I inspected the text element and added a new color to the .dijitButtonText (highlighted in yellow) to change the color of the text.

inspect.png

View solution in original post

8 Replies
TimWitt2
MVP Alum

Try this and see what it does:

.dijitMenuItem TD{

        color: white;

    }

Hope this helps!

0 Kudos
KenBuja
MVP Esteemed Contributor

If I ever want to see the css and html for an object, I use Chrome's Developer tool called "Inspect Element" by right-clicking on an object.

In the example below, I inspected the text element and added a new color to the .dijitButtonText (highlighted in yellow) to change the color of the text.

inspect.png

TimWitt2
MVP Alum

Ken is right, with my code you will only change the color of the dropdown text, which you probably want to change as well.

0 Kudos
TimWitt2
MVP Alum

Ken,

I just realized that this will change the color of all button text.

Write it like this so only the button text for the measure will be changed:

   #measurementDiv .dijitButtonText {

        color: white;

    }

Tim

0 Kudos
KenBuja
MVP Esteemed Contributor

Good catch, Tim!

0 Kudos
jaykapalczynski
Frequent Contributor

Im trying that with the Developer Tools and not getting to where you are....wonder what I am doing wrong

I thank you both for your thoughts....going to add that CSS, but really trying to figure out how you got to that in your image...I cant seem to get there.

measure2.jpg

0 Kudos
KenBuja
MVP Esteemed Contributor

You have to make sure the mouse is directly over the object you want to inspect. Sometimes it's difficult to get the right object, depending on how everything is laid out.

0 Kudos
jaykapalczynski
Frequent Contributor

Thanks Ken....was able to see that now...very useful....

0 Kudos