Images not displaying if using file:///c:/

Posted by Ben on Stack Overflow See other posts from Stack Overflow or by Ben
Published on 2010-05-02T15:06:46Z Indexed on 2010/05/02 15:17 UTC
Read the original article Hit count: 197

Filed under:
|
|

I am using jQuery and would like to display the images from my PC, rather than hosting them. I have the following:

/* works fine: */
.ui-widget-header .ui-icon {
  background-image: url(images/ui-icons_2e83ff_256x240.png);
} 

/* does not work: */
.ui-widget-header .ui-icon {
  background-image: url(file:///C:/ui-icons_2e83ff_256x240.png);
}

When I put file:///C:/ui-icons_2e83ff_256x240.png in a browser, it displays the actual image beautifully. Both locations are valid image locations.

Could this not working be to do with the image being a sprite? Does anyone have any ideas on this one? Many thanks.

© Stack Overflow or respective owner

Related posts about css

Related posts about images