I am keeping my both html and css stylesheet files in the same folder and images in a "img" folder.
Relative links to images works on html:
<img src="img\Philippines.png">
but it doesn't work in css when i write:
#Philippines {
background-image:url("../img/UK.png");
it does work when i put full url:
#Philippines {
background-image:url("file:///C:/Users/User/Dropbox/+HOROS%20code/img/Philippines.png");
I want it to work with relative urls, any help?
url()
in CSS is relative to the location of your CSS file.If I understand you correctly, this is your folder structure:
If so, try this: