Why isn't my background image showing?

admin

Administrator
Staff member
Hi,

It's really late and I'm tired, could just be tiredness! Anyway this is probably staring me in the face. I have this in my stylesheet:

body {
background: #000000
background-image: url("morton.jpg");
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
font-size: 135%;
font-family: arial;
scrollbar-base-color: #0027EE;
scrollbar-track-color: #000000;
scrollbar-arrow-color: #000000;
scrollbar-3dlight-color: #FFFFFF;
color: orange;
}

Any ideas why the image isn't being displayed...it's in the same folder as the style sheet, so it's not that, the name is also correct. Please ignore the use of 'orange', I did that just to make sure that the rest was okay!! It's coming out!

Thanks in advance! Off to bed so that I'm nice n fresh tomorrow!some browsers choke on ". Use '

JohnBetter yet, do not use quotes at all. They are not needed and not recommended. You might also try changing your selector to html, body as well.And don't forget the semicolon.

background: #000000;

Could also be written as...

background: #000;And the entire background part could be written as:

background: url(morton.jpg) #000 no-repeat fixed center;Thank you all so much, I thought that the quotes had to be double and that each item had to be individual with a ; at the end!

I'll have a crack at that much neater, cleaner way of doing it!color: orange; does not exist have you been reading CSS 2.1 by accident and it is better to use quotes (" ") because it relates to a path so keep on using them.
 
Back
Top