Click to See Complete Forum and Search --> : background image not showing


bloodyscript
May 23rd, 2009, 04:34 PM
hi im making a simple site nothing to fancy. im useing dreamweaver to create it, now the background image is viewable on dreamweaver on my computer. but when i uploaded the pictures and the site to my server (powweb) the background picture is not viewable at all tho all the other pictures on the site that i uploaded are.

heres the site http://www.mramerican.us

section from my css style sheet:

body {

background-image: url("americanflagbackground.JPG");
background-position: top right;
background-repeat: no-repeat;
background-attachment: fixed;

section from my html index page:

{
background-image: url("americanflagbackground.JPG")
}
body {
background-image: url(americanflagbackground.JPG);

PeejAvery
May 23rd, 2009, 04:42 PM
You're problem is case-sensitivity. The file you uploaded is americanflagbackground.jpg not americanflagbackground.JPG.

HanneSThEGreaT
May 25th, 2009, 09:00 AM
Why do you have this :
{
background-image: url("americanflagbackground.JPG")
}
body {
background-image: url(americanflagbackground.JPG);

Instead of just :
body {
background-image: url(americanflagbackground.JPG);
}

¿
Or should it be like that ¿
Granted, I'm not the best designer in the world, but I really think that the Background image declaration above the body declaration is overkill.

PeejAvery
May 25th, 2009, 10:26 AM
Two things...

1. Hannes is right. The first declaration of the image is invalid since it isn't addressing any tag or name. Remove that part of code.

2. It will work with quotes, but having quotes there is invalid CSS.

Clipster
May 26th, 2009, 03:03 AM
You only need quotes for strings with spaces in them.
Like setting a font, some fonts (lucida grande) have spaces so you would need quotes:

element {
font-family: 'lucida grande';
}


With out spaces quotes are not needed.

element {
font-family: arial;
}

bloodyscript
May 29th, 2009, 09:58 PM
ok thanks for the info. not sure why the declartion was there. and thanks i didnt even notice the caps.