Click here to Skip to main content
15,908,013 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I create a website where i use a background image. if I open my website on PC then it looks fine but when open in android device there exist white background after my background image. please how to solve this problem.

What I have tried:

I create a website where i use a background image. if I open my website on PC then it looks fine but when I zoom out the browser windows and also open in android device there exist white background after my background image. please how to solve this problem. This is my css still I face the problem

background: url(../images/bg.jpg) no-repeat center ;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
Posted
Updated 30-Mar-16 5:26am
v2

1 solution

Add a background-size rule to your CSS:
CSS
body
{
    background-image: url(...);
    background-size: cover;
}

CSS3 background-size property[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900