Are there any common pitfalls to using this attribute? I can’t seem to get it to work. The image is in the same directory as my HTML page and I checked the absolute path which is correct. I also tried setting the background to a random color to see if my div placement was off or something, but the color showed.
I used:
body{
background-image: url(‘url’);
}
Try,
background:url(image.jpg). Notice, I’m not usingbackground-image, and justbackgroundMake sure the path of the image is correct and relative to the CSS file.
Make sure the filename of the image is correct. The filename, including the extension, can be case sensitive.