View Full Version : Background color and picture not cooperating


duckgirl
08-21-2003, 11:33 PM
When I use to place a background image and color for when the image runs out, Netscape's funny about it... I'm on mac, and Netscape (a pretty recent version) will display the picture but not the background color and cease to have the text scrolling over it when I use the bgcolor:ffffff or whatever in the body tag. Maybe I'm doing that wrong, but IE handles it fine. I can solve this by just using basic html with <body bgcolor="#ffffff"> but it's annoying. It does this regardless of whether I have internal or external style sheets.

I mean, here's the code I have for it on the stlyesheet...
BODY { bgcolor:ffff00 BACKGROUND-ATTACHMENT: fixed; BACKGROUND-IMAGE: url(newbacky.jpg); BACKGROUND-REPEAT: no-repeat}

And I've experimented with moving the bgcolor to different parts of the tag....

Why does Netscape do this to me??

jazzberry
08-21-2003, 11:37 PM
you forgot a ";" and "#" :) and the bgcolor should be background i think :)


BODY { background:#ffff00; BACKGROUND-ATTACHMENT: fixed; BACKGROUND-IMAGE: url(newbacky.jpg); BACKGROUND-REPEAT: no-repeat}

rwllms15
08-21-2003, 11:40 PM
Let's make this code human...

body { background-color: #ffff00; background-attachment: fixed; background-image: url(newbacky.jpg); background-repeat: no-repeat; }

Always use background-color instead of background, include the pound sign (#) in front of your hex codes, and end styles with a semi-colon.

edit: As I was posting I see Jazz fixed the hex code # sign. Good Jazz, good.

duckgirl
08-21-2003, 11:44 PM
Yeah, I was quite suspicious that bgcolor wasn't the right tag, but it always seems that IE is more forgiving of mistakes in code than netscape, which is why I have to view in both!

pb&j
08-22-2003, 08:30 AM
if you want to scrunch it down a bit...

body {background: #ffff00 url(newbacky.jpg) no-repeat fixed;}