Select to view content in your preferred language

Help adding Print button to toolbar

2108
12
Jump to solution
02-04-2013 11:44 AM
JaniceBaird
Frequent Contributor
When I add the print button to the nav tool bar, I get an extra button behind the print button. Is there a way to add the print button as shown in the attached screen shot without getting an extra button?

thanks,
Janice.
0 Kudos
12 Replies
JaniceBaird
Frequent Contributor
Hey bgfield,

You may need to tweak the height of the print button to get it to be the same size as the other buttons. I set mine to 21px. See the attached file.

Janice.
0 Kudos
JianHuang
Deactivated User
Brett,

The default style of the print button has a 8px padding around it. So you have to set it as 0px to make it line up with other buttons.
.esriPrint{
float: left;
padding: 0px;
}


Glad I found this thread - I was having the same issue where the print button was adding itself above or below the toolbar next to the other tools.  Adding float:left to the CSS fixed that problem.

Now, though, the print button screws up the "look" of the toolbar.  I have three other items added to the toolbar, all of them dijit.form.DropDownButtons, which all line up neatly when added to the toolbar.  Adding the print button - I suppose since it's a "button" not a "DropDownButton" - messes with the alignment.  See the attached screenshot.

So far I've left the CSS of the drop down buttons the default claro style, but before I go customizing them I'd like to have the Print button match their style.  Is there a way I can call in the print dijit as a .dropdownbutton instead of a .button, so the styles match?
0 Kudos
BrettGreenfield__DNR_
Frequent Contributor
Thanks!  The simplest answers are always those that elude me most.
0 Kudos