View Full Version : Div layer background problems


PrincessSammy
04-25-2004, 04:11 PM
I wanted to have a background image for one of my div's. Here is the code I have:

#blog {
background-image: url(http://www.lowqualitycomics.com/caz/bbg.gif);
background-repeat: no-repeat;
background-attachment: fixed;

position: absolute;
border: 2px solid #A50317;
margin-top: 100px;
margin-left: 410px;
padding: 0;
margin-right: 0;
height: 450px;
width:400px;
overflow: auto;
font-family: Palatino Linotype;
color: #A50317;
font-size: 12 ;

scrollbar-face-color : #000000;
scrollbar-highlight-color : #E37609;
scrollbar-3dlight-color : #E37609;
scrollbar-shadow-color : #A50317;
scrollbar-darkshadow-color : #000000;
scrollbar-track-color : #000000;
scrollbar-arrow-color : #A50317;
}

It only works in IE, Mozilla and Netscape just aren't working. here is the link :

http://www.lowqualitycomics.com/caz/test

Sammy

bourdelson
04-25-2004, 04:24 PM
For Mozilla and Netscape, I believe you need to add this into your CSS, along with the background-image:url(blah.gif); stuff:

layer-background-image:url(yourfilename.gif);

thejermyn
04-25-2004, 04:29 PM
css might not work well on those browsers, i suggest using the <body background="blah.gif"> code just for the background...

bourdelson
04-25-2004, 04:36 PM
If CSS didn't work well with those browsers, then why would people use it, and why would it validate?

http://www.w3schools.com/css/css_intro.asp

Calidris
04-25-2004, 04:48 PM
I can't see why the other browsers decide not to show your image, but they are probably right not to for whatever reason. It's unlikely to be a bug because it only shows in 1 out of 7 browsers I have, lol.

This code works fine (and it's shorter):
background: #000 url("http://www.lowqualitycomics.com/caz/bbg.gif") fixed;

I've noticed that the problem lies with the "no-repeat" decleration. Not sure why but that's the cause of your problem *shrugs*

Calidris
04-25-2004, 04:52 PM
I've noticed that the problem lies with the "no-repeat" decleration. Not sure why but that's the cause of your problem *shrugs*

PrincessSammy
04-25-2004, 07:00 PM
css might not work well on those browsers, i suggest using the <body background="blah.gif"> code just for the background...


Using <body background="blah.gif"> put that picture on the background of my whole page and thats not even a CSS tag.


THANK YOU Calidris!!! That works great!!!! ^_^