insert background image css error code example

Example 1: insert background image css error

background-image: url(../images/nickcage.jpg); // css and image live in subdorectories

background-image: url(images/nickcage.jpg); // css lives with html but images is a subdirectory

Example 2: background isn't working if in separate css file

background-image: url(../picture-folder/your-picture.png) 0 0; 
//No quotes, two dots before "/"
//Also make sure that your  in html has some transparent image as src

Example 3: background image in css is not working

background-image: url(nickcage.jpg); // first problem may be missing quotation mark
// Second may be wrong path 
// check the name of the file if there is any error
// check whether you are using proper extension of the file

Tags:

Misc Example