Fade background with css but keep background image

The code below fades the background from black to white but it also overwrites the background that is set in the body section of the html code. How can I keep the background image and also fade from black to transparent/white with the bacground image in the background of the fading?
body {
	text-align: center;
    /* Mozilla: */
    background: -moz-linear-gradient(top, #000000, #FFFFFF);
    /* Chrome, Safari:*/
    background: -webkit-gradient(linear, left top, left bottom, from(#000000), to(#FFFFFF));
    /* MSIE */
    filter: progid:DXImageTransform.Microsoft.Gradient(
                StartColorStr='#000000', EndColorStr='#FFFFFF', GradientType=0);
}

Open in new window

LVL 2
itniflAsked:
Who is Participating?
 
COBOLdinosaurCommented:
The body only has one background.  If you do a special effect it is going to affect everthing.

You could try overlaying a div in the body and fadt he background of the div.


Cd&
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.