Forum Moderators: not2easy

Message Too Old, No Replies

Gradient background tuning

         

YaklDakl

4:34 pm on Mar 26, 2011 (gmt 0)

10+ Year Member



Hi,

I am trying to apply a gradient background to the body of my site.[tinyurl.com ]

The 2 problems I have right now is that: 1)it does not work in IE and 2) on shorter pages the gradient ends as in this page: [tinyurl.com ]

this is the code I have in there now:

body{
background: -moz-linear-gradient(top, #838357 , #DCDCDC);
background: -webkit-gradient(linear, left top, left bottom, from(
#838357), to( #DCDCDC));
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#838357 ', endColorstr='#DCDCDC');
}


thanks for any help

alt131

11:09 am on Mar 28, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi YaklDakl,
Not quite sure I understand what you mean by "does not work" (and those links go to the front page of WebmasterWorld), but do you mean the gradient is appearing as gray rather than green in ie?

If so, try adjusting the colour string as gradient takes aRGB. Assuming you want an opaque color, maybe something like:
startColorstr='#ff838357'
and
endColorstr='#ffDCDCDC'

In terms of the "gradient ends", does that mean the gradient is not filling all of the viewport? If so, that will be because the body is not being stretched the full height.
Try adding height:100% to the rules for html and body.