Search code examples
iphoneioscssmobile-safari

Mobile Safari removes body background image


http://www.samson-book.com

This site has a background image set via CSS on the page body. it displays on every desktop browser, and android, but NOT on mobile safari in iOS. I cannot figure out why.

CSS:

@media only screen and (max-width: 480px) {
  body {
  background-image: url("img/bg_small.jpg");
  background-repeat: no-repeat;
  background-color: #000;
  }
  #coverbox {
    width: 80%;
    margin-left: 20px;
  }
}

Solution

  • Not sure but have u tryede just single line it like:

    background: url('img/bg_small.jpg') no-repeat top center #000;
    

    the top center is just alignment so it wil stick to the top of the device and center it automaticly. Hope it helps normaly works for me.