Log in

View Full Version : backgrounds in divs in ff



kosi
04-11-2007, 07:47 AM
I've noticed that when I apply a background to a div in ie like this:


div.main_id {
background: #ffffff url(images/background_image.jpg) bottom right fixed no-repeat;
border: #880000 outset 5px;
width: 600px;
height: 400px;
}
it renders the right edge of the image against the right edge of the div, but in firefox, it looks like it renders the right edge of the image against the right edge of the screen but only displays the part that is inside the div . . . in other words, the background doesn't line up with the div, and I only see part of the image. Is there a way to make this work in both browsers? Thanks.

NXArmada
04-11-2007, 01:22 PM
Do you have an example that we can see?

Veronica
04-11-2007, 02:02 PM
Take out the word "fixed" so your code would be



<style>
#main_id {
background: #696969 url(images/background_image.jpg) bottom right no-repeat;
border: #880000 outset 5px;
width: 600px;
height: 400px;
}
</style>