Solved

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

Posted on 2006-11-16
3
647 Views
Last Modified: 2008-03-06
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?

0
Comment
Question by:bswiftly
  • 2
3 Comments
 
LVL 11

Expert Comment

by:ethoths
Comment Utility
Whats wrong with...

background-image:url(~/images/grad01.jpg); ???
0
 
LVL 1

Author Comment

by:bswiftly
Comment Utility
well, it doesn't work!

thats whats wrong. haha.

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

Accepted Solution

by:
ethoths earned 20 total points
Comment Utility
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

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now