views:

34

answers:

2

I have two themes in my .Net application, both use the same background image. Both have an images folder with this image in them, both have style sheets. One works and one doesn't but ONLY when deployed in IIS in a Virtual Directory scenario so there is an added /MyApp/ directory.

I can't seem to even trick the one that doesn't work into finding the image. My style looks like this:

body 
{
    margin:0px;
    font-family: Trebuchet MS, Verdana;
    font-size: 12px;
    font-style: normal;
    background: #fff url(images/mainbg.jpg) repeat top left;
}

Any ideas for resolving the images directory once the application is deployed?

A: 

Try:

background: #fff url(/images/mainbg.jpg) repeat top left;

It depends where the style sheet is in relation to the images folder. You should be able to get it be testing...

IrishChieftain
A: 

Well I was using the app_themes folder and my stylesheet was at the root and my images were in the images folder of my themed directory. As I said it worked in once scenario but not the other. The code in each was identical as were the background images. I finally gave up and broke the stylesheet into a completely separate directory and put the image in my images folder instead of the images folder within my theme and it worked. It just makes no logical sense to me that code and directory structures that are essentially identical render different results.

tinab
try the 'Theme' page property...
IrishChieftain