0

I am working on changing themes dynamically in css files. I have multiple css files and the images used in the css files are stored in Content/themes/base/images/image.jpg But i am not able to see the images I searced other blogs and some one told me that they are relative the css files and images so i tried to change the default Css file that is Site.css But i am also not able to view the image

Here is what i tried:

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

Please help me...

EqEdi
  • 61
  • 1
  • 2
  • 15
  • 1
    you can use it like this: background-image:url('/Content/themes/base/images/image.jpg'); - not relative – kleinohad Mar 06 '12 at 10:18
  • Please check this link : http://stackoverflow.com/questions/2188218/relative-paths-in-javascript-in-an-external-file – linguini Mar 06 '12 at 10:19
  • @kleinohad hey thanx i tried this worked i had nt placed my css file properly..it is working now – EqEdi Mar 07 '12 at 05:46
  • possible duplicate of [in asp.net.mvc, what is the correct way to reference images inside of css](http://stackoverflow.com/questions/5730528/in-asp-net-mvc-what-is-the-correct-way-to-reference-images-inside-of-css) – Cookie Dec 16 '14 at 10:47

1 Answers1

-1

you can use it like this: background-image: url('/Content/themes/base/images/image.jpg'); - not relative

kleinohad
  • 5,800
  • 2
  • 26
  • 34