How to add custom image to a button (dojo 1.7)

dojo, html

Solution

These answers are close, but the style definition for your icon must include the following:

.myIcon {
  background-image: url(...);
  background-repeat: no-repeat;
  width: 16px;
  height: 16px;
  text-align: center;
}

Problem

How do I add a custom image to a dojo button here is the sample code for button without image ``` <div id="zoomin" data-dojo-type="dijit.form.Button"> <span>zoomin</span> </div> ```

Original source