tags:

views:

66

answers:

2

I have a tiling background image, but I want to overlay another tiling image over it. I have tried using:

html {background: transparent url('../images/bgtile.jpg') repeat top center;}
body {background: transparent url('../images/body.png') repeat-y top center;}

But it doesn't work quite right. The body tag behaves like a div because it doesn't stretch to fit the screen.

I am sure that I am just missing something obvious.

+3  A: 

Try this (It works in FF3 and IE7 and I assume Safari and Chrome):

html {
     background: transparent url('../images/bgtile.jpg') repeat top center;
     height: 100%;
}
body {
     background: transparent url('../images/body.png') repeat-y top center;
     height: 100%;
     overflow-y: scroll;
}
html > body {
    min-height: 100%;
    height: auto;
}
Ramblingwood
wow, that was fast. Thanks for the quick response, that works really well.
Uberlemurguy
no problem, this bugged me for a week and now I have it just sitting in a text file waiting to be used, I just had to change the filenames to match.
Ramblingwood
A: 

Why not work with a 100% width / height within the ? That should work with every browser.

Pekka
it doesn't work very well once you scroll and some other things that I forget at the moment.
Ramblingwood
Than can all be solved, I think.
Pekka