Reputation: 139
i have a website @local and lots of images in site, but after I deploy site to server images paths are broken(exception given in css file), and I need to fix this as soon as possible.
sample path:
imageurl = @"/Images/sample.gif";
how can i fix this?
thank you.
Upvotes: 1
Views: 435
Reputation: 52241
Images (like background-url) in CSS are always referenced relative to the css file.
you need to set in css file like...
background-image: url( '../../Images/image.gif' );
.. this will bring out one folder from current folder hierarchy
Upvotes: 1
Reputation: 7947
you can set a appsetting in web.config file with server url like
and get this path on code and add image name with it.
Upvotes: 1