Background Image Not Found from My CSS File

Background image not found from my css file

If your paths are
htdoc/anyFolder/css/style.css and
htdoc/anyFolder/image/search.png

This should work:

background-image: url("../image/search.png");

This should also work:

background-image: url("/anyFolder/image/search.png");

But you say they didn't. You should check if the names of files and folders are correct and also if you have the base element on HTML, because it could change the path where the browser looks for files.

CSS Background image not loading

here is another image url result..working fine...i'm just put only a image path..please check it..

Fiddel:http://jsfiddle.net/287Kw/

body 
{
background-image: url('http://www.birds.com/wp-content/uploads/home/bird4.jpg');
padding-left: 11em;
padding-right: 20em;
font-family:
Georgia, "Times New Roman",
Times, serif;
color: red;

}

CSS - Extra background image for when the first image doesn't load?

Simple answer:

You could either nest the span inside another span - with the outer span set to use the backup background image. If the inside span's background isn't available, then you'll see the outside one's

Better, more difficult answer:

You could achieve a similar result in pure CSS, by adding some psuedo content before the span, and then styling that to have the fallback background. However, this usually takes some trial and error to get it right;

Something lile

span.image:before{content:" "; background:url(backup.png); display: block; position:absolute;}

CSS Background Image Not Displaying

According to your CSS file path, I will suppose it is at the same directory with your HTML page, you have to change the url as follows:

body { background: url(img/debut_dark.png) repeat 0 0; }

CSS background-image url() not showing with error '404 not found' in various browsers

Assuming that the file path is correct, I see two problems for you:

  1. You should use a forwards slash, not a backwards slash – i.e., images/landing.jpeg, not images\landing.jpeg
  2. You need quotes around the file path, inside the parentheses: background-image: url('images/landing.jpeg')

CSS background-image not showing my image

The way you wrote that CSS rule only the very last line will apply, which is

background-image: url("intro.png"); 

(it overwrites the other lines before it)

So you probably want to change that to

#intro {
background-image: url("../img/intro.png");
height: 300px; /*whatever value, if there is no content */
}

Plus, as someone wrote in the comments: if that element has no content and no defined height, it will have height 0, therefore the background image will not be visible.



Related Topics



Leave a reply



Submit