Login Register

Directly styling the background for a dijit (Button).

I'm trying to change the styling of a single button on a page.

If I have the following:

<button dojoType="dijit.form.Button" style="background: url('pattern.gif');">
    Click
  </button>

my own pattern is applied to the <div> html element generated by dojo.
But the <button> element beneath it in the DOM (also generated by dojo) takes its background styling from the theme I'm using (tundra).
The effect is that I briefly see my own background gif while the page renders, but my gif is then obscured by the theme-provided gradientTopBg.png.

Am I using the wrong approach to style this button?

The book of Dojo (Applying style directly to a widget - http://www.dojotoolkit.org/book/dojo-book-0-9/part-2-dijit/themes-and-de... ) suggests that my approach should work.

Thanks in advance for any help.
Neil.