css - Local Background Image Not Loading -


this 1 seems simple wont work reason. have background-image (locally) in css this:

#header { background-image: url('/../img/students.jpg'); } /*also tried */ #header { background-image: url('../img/students.jpg'); } 

but wont load. here directory structure:

---css -------styles.css ---img -------students.jpg 

anything missing?

this should have worked.

#header {      background-image: url('../img/students.jpg');  } 

also, should work

#header {      background-image: url('/img/students.jpg');  } 

my guess you're having caching issues. first attempt wrong, /../img/students.jpg goes 1 level above document root, not possible. maybe css error has been cached browser, try hitting ctrl + f5 several times (or completly clear browser's cache) once have fixed css file 1 of solutions above.


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -