schlot

Change the position of a background-image on a button?

Discussion created by schlot on Jan 22, 2013
Can I change the position of the background image on a dijit.formButton?  I have my button defined as

        <button data-dojo-type="dijit.form.Button" class="toolButton" iconClass="findIcon" onClick="" style="position:relative;left:5px;" label="Find" showLabel="true">
             Find</button>


My style is:
toolButton{
  background-color: rgb(126, 171, 205);
    border:solid 1px #000000;
    color: #000000;
    font-weight:bold;
    background-repeat: no-repeat;
    background-position:bottom center;
    }
  .findIcon {
       background-image: url("../images/tool_find.png");
       background-repeat: no-repeat;
       height:40px;
       width:40px;
   
}


I thought the background-position is what would let me change the position of my icon, which defaults to the left of the label.  Can I not change this to have the icon on top instead?  Changing the background-position doesn't seem to do anything.

Outcomes