html - Background image referenced in external css is not loading -


I have this in an external CSS file, but it does not work at all. I think I wrote it wrong, but when kept internally, it works fine. Any ideas as to what might happen?

  html {background-image: url (images / background-grid.jpg); Background repeat: repeat; }    

I think your CSS file is in a folder like this

The path given in your CSS file is relative to the path of the CSS file (in the example I gave, CSS folder). Therefore you should use .. :

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

Comments