Take the 2-minute tour ×

I am creating some DOM elements in Javascript and add some classes to them which I then use the classes in my CSS to add a background image using:

background: url('/images/reply.png');

However when I do this and run the app the images show, but so does a thin border and a small black dot in the center. This box and dot show up also when you use a bad URL in the CSS background: url() part. But once the URL is correct, it still shows up along with the image.

Anyone figure out why this happens in Win 8?

share|improve this question
the thin border and black dot aren't something I'm seeing with an invalid URL in the background, can you provide a bit more context - perhaps upload an image? can you reproduce with static HTML/SS. –  Jim O'Neil Feb 13 '13 at 5:43
+1 on the screen shot; without that I'm baffled by what you're seeing. –  Dominic Hopton Feb 13 '13 at 8:20
for some reason if works if I initially set the image to have a src attribute and then later give it a css background:url() on hover. But if I initially use CSS then the problem persists. I will try to add a pic –  Matt Hintzke Feb 13 '13 at 17:47

1 Answer 1

You can use "ms-appx://" prefix:

.myClass {
   background: url("ms-appx:///images/myImage.png");
share|improve this answer

Your Answer


