0

I have a website that is using a fixed background for the background. It works correctly in desktop and in android but iphone seems to not accept fixed background as the background it static and scrolls with the page. the website link is www.ofevape.com to view in the iphone. I have tried !important on the background which doesn't seem to change anything. It doesn't seem to respond to fixed background and cover.

i'm using the following code for my background.

body {
    font-family: 'open_sansregular';
    font-size: 1em;
    margin: 0;
    padding: 0;
    background: url(images/bg-wood-light.jpg);
    //background-image: url(images/bg1.jpg);
background-repeat: no-repeat;
background-attachment: fixed;
background-position: top;
background-size: cover;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
height: 100%;
width: 100%;
background-position: center center;
background-repeat: no-repeat;
}
Ty T.
  • 586
  • 5
  • 18
  • have you tried !important on background-size and background-attachment also? – Stefan Neuenschwander Jan 18 '16 at 21:16
  • If this doesnt work only other reason i can think of is that ios must somehow resize the body size to be as big as the content, what you have to do then is create a div inside the body tag with correct properties #fixebg{ background: url(image.jpg) top; height:100%; width:100%; position:fixed; } (taken from http://stackoverflow.com/questions/16009035/fixed-position-background-on-ios) – Stefan Neuenschwander Jan 18 '16 at 21:18

0 Answers0