2.0 Themes - .css file sets image location outside of theme folder

I have a theme that uses a stylesheet.  All the images are uniform across themes so I want to have the images outside the theme folder.  How do i do this?

If its a resource i can go:

background-image:url(~/images/grad01.jpg);

or if its inside the theme I can set it like:

background-image:url(images/grad01.jpg);


this:   background-image:url(./images/grad01.jpg);   doesn't seem to work if the image folder is in the root of the web app.  How can I do this?

LVL 1
bswiftlyAsked:
Who is Participating?
 
ethothsConnect With a Mentor Commented:
The "~/" only works for server controls. If you put the images folder in the root of your web then "/" should work. If not then you have to reference from the root "/MyWebRoot/".

If your website's address is http://localhost/MyWeb/ then you will have to include the "/MyWeb/" in your path. That or make all your images server controls.

0
 
ethothsCommented:
Whats wrong with...

background-image:url(~/images/grad01.jpg); ???
0
 
bswiftlyAuthor Commented:
well, it doesn't work!

thats whats wrong. haha.

the ~ seems to be for files that are put in as a "resource".
0
All Courses

From novice to tech pro — start learning today.