View Full Version : backgroundColor partly updating?

08-18-2007, 10:48 PM
I have written a javascript version of tetris and at every 10th cleared line, I change the body background color more towards red. However, the page only seems to update parts of the background. It is only after min/maxing the window or otherwise forcing a redraw that the whole page background is actually updated to the correct color.

Any idea why this is and if/how this can be fixed?

This line works as expected, but it may be relevant to highlight.

document.body.style.backgroundColor = "rgb(255," +GB+ "," +GB+ ")";

If you manage to clear 10 lines you can see it yourself (http://www.kirl.nl/tetriix.php). :)

Tested in Opera, other browser may have trouble.

08-19-2007, 12:46 AM
You could try setting the body and html css height to 100%
html, body { height: 100%; }