This took far too long to figure out. I was opening a dialog in XUL in my firefox plugin, but it was arriving with a transparent background, which made it render really weirdly. The solution is to put the following in your css for the dialog tag:
background-color: menu !important; opacity: 1.0;
My guess is that the background is transparent so you can see images set by firefox themes/skins, but it is pretty annoying!