Author | Message |
---|---|
msargent
Posts: 519
|
Posted 16:59 Oct 21, 2015 |
If your css file is in a different folder than the html file it is styling, if you reference an image in your css, the path should go from the css file to the image, not from the html file to the image. That is, if index.html is styled by main.css, and main.css is in the styles folder, and images are in an images folder, and index.html is in the same folder that the styles and images folders are, then to set a background image in the images folder to an element in index.html using main.css, the path should be ../images/pic.jpg. You need to go up a directory out of styles, and down back in to the images directory to reference the image --- this is the path from main.css to the image. The path from index.html to the image, however, is not relevant for this style rule. Last edited by msargent at
17:01 Oct 21, 2015.
|