tags:

views:

283

answers:

2

Hi,

I have a webpage where I want to show the background image @ the bottom right corner of the page. For this I have the following code:

body
{
    background-image:url('img_tree.png');
    background-repeat:no-repeat;
    background-position:bottom right;
}

This code works fine in IE. But in FireFox, the image is shown at the 'top' right.

Please suggest.

Regards - Ashish

+2  A: 
html, body { height:100%; }

body {
    background:url(img_tree.png) no-repeat bottom right;
}

I think it's just that your page isnt taking up the full viewport height, which the 100% height on body/html does.

meder
Position is fixed now, however now the image goes a little too low in (shows a vertical scroll-bar). You can see the screen-shot below (see the bottom right corner) http://i32.tinypic.com/2rf6a8o.jpg
Vinnie
Could you please provide the full source code/demo page?
meder
A: 

I usually just use

background: url(img_tree.png) right bottom no-repeat;

This works fine in IE and firefox

jasperdejong