PDA

View Full Version : Non Scrolling BG on Scrolling Div


Death Dream
05-23-2008, 02:41 PM
This worked in FF but not IE:

background:#2f3535 url(Images/singlebg.gif) repeat-x scroll;This worked in IE but not FF

background-attachment:fixed;
Is there a way to get them BOTH to be fixed?? I'm not even sure if the FF code was right but it worked lol.

Edit
Fixed
background:#2f3535 url(Images/singlebg.gif) repeat-x bottom fixed;After looking close at it, it was staying still, it just wasn't watching up with the div and it was lining up with the page. I used the "bottom" to push the image to the bottom of course and everything works :) This is for FF, the above code worked for IE on the attach

~Death Dream~

domedia
05-23-2008, 03:15 PM
Remember that some selectors will cancel another ones. You cannot define background and background-attachment for the same element in 2 different rules. Either use the CSS shorthand background, or define them all separately.

Death Dream
05-23-2008, 03:38 PM
Remember that some selectors will cancel another ones. You cannot define background and background-attachment for the same element in 2 different rules. Either use the CSS shorthand background, or define them all separately.


background-attachment:fixed;

I ended up taking that code out because the other one did it in both browsers.


~Death Dream~