CSS3 background gradient: webkit-based browsers misbehave!

Status
Not open for further replies.

fjpoblam

Ars Scholae Palatinae
1,414
I specify, for my body background, a gradient from top to bottom, of one color to another, with a stop halfway of a third color. Let's call them colors A (top), B (mid), and C (bottom). Color C is the fallback background color.

I specify the W3 background format, then the -moz proprietary, the -o proprietary, and the -webkit propriety (all of which are these days quite similar). I've tried moving these into different sequences (W3 first, W3 last, -webkit first, -webkit last, -webkit in the middle, and so on). All with the following result.

In Aurora/Firefox and Opera/Next, the background gradient displays as expected, occupying the entire web page background, no matter what physical window size is used (i.e., no matter how the window is dragged to resize it).

In Safari/Webkit/Chrome/Canary, the background consistently displays with a bottom bar reverting to color A. The window may be dragged to a smaller size to eliminate display of the bar.

This leads me to believe my linear gradient (in Webkit-based browsers) doesn't FORCE 100% screen length somehow, and that the gradient is getting tiled. Specifying "repeat-y" doesn't seem to make any difference.

My OS is MacOSX 10.6.7 on a 13" MBP. The proprietary CSS is:
-webkit-linear-gradient(top,A,B,C)

Does anyone have a hint as to what may be going wrong and what I might do to fix it?
 

fjpoblam

Ars Scholae Palatinae
1,414
Good link. Thanks! FWIW, found another suggestion on a different forum:

Set fallback color as background in html;
set fallback color as background in body;
set background-repeat:no-repeat in body.
After background-repeat specification, lay gradient specs in place.

What fun gradients are!

BTW, I didn't know until seeing your tool, about the -ms proprietary. :)
 
Status
Not open for further replies.