Sunday, August 4, 2013

Setting a background image to cover one entire content page only

Hi,


By default, the “background-color” of the web part area is “rgb(255, 255, 255)”, that is reason while you can see white below the image.


To make the background image cover the entire content page, we can set the attribute of “background-color” as “transparent” in the .s4-ca class, then the image will fully display.


Please insert this code snippet into a Content Editor Web Part, it will override the original attribute in the CSS file:



<style type="text/css">
#s4-mainarea{
background-image:url('your image url');
}
.s4-ca
{
background-color:transparent;
}
</style>

Best regards,


Dennis



No comments:

Post a Comment