I am using the background image in my application in CSS . I am using the following code to get the background image file
background-image: url("Image\GREEN.GIF");
but I am not able to get the Image .. I know that it is path problem .. I can able to get the
absolute path in java using
path=new File("web/CSS/myimage.gif").getAbsolutePath();
but in CSS how to get the absolute path..
please help me in getting the absolute path in CSS
Thanks in Advance
Raj
I’m not sure there is a way to get the absolute path via CSS, but can you not use relative paths here?
Say you have the following:
In order to then reference your images from you css file, you would simply put a path of