Note that there are some explanatory texts on larger screens.

plurals
  1. POWebsite body background rendering a right white margin in iPhone Safari
    primarykey
    data
    text
    <p>I have a rendering error in this website which I haven't seen anywhere else. The website renders in all modern browsers and validates fine although I can't figure out why is it not displaying the full background image (see screenshots below). I am using Yahoo CSS Reset and the background image is declared in the body like this:</p> <pre><code>background: url("back.jpg") #033049; </code></pre> <p>You can also visit the website: <a href="http://xaviesteve.com/" rel="nofollow noreferrer">http://xaviesteve.com/</a></p> <p><img src="https://i.stack.imgur.com/58NAR.jpg" alt="enter image description here"></p> <p><img src="https://i.stack.imgur.com/0QXni.jpg" alt="enter image description here"></p> <p>Let me know if I should provide any more details. Any help/hint is appreciated, thank you.</p> <p><strong>EDIT</strong></p> <p>I have found very few people reporting this issue around the Internet:</p> <ol> <li><p>Another SO question: <a href="https://stackoverflow.com/questions/4617872/white-space-showing-up-on-right-side-of-page-when-background-image-should-extend">White space showing up on right side of page when background image should extend full length of page</a> Suggested applying <code>overflow-x:hidden</code> but it crops the website.</p></li> <li><p>In an iPad forum: <a href="http://www.ipadforums.net/ipad-development/9954-mobile-safari-doenst-show-background-image-when-page-slided-left.html" rel="nofollow noreferrer">http://www.ipadforums.net/ipad-development/9954-mobile-safari-doenst-show-background-image-when-page-slided-left.html</a> No replies</p></li> </ol> <p><strong>SOLUTION</strong></p> <p>I've been investigating and trying different ways to solve this and found that adding the background image to the <code>&lt;html&gt;</code> tag fixed the problem. Hope this saves some time to other devs.</p> <p><strong>Before</strong></p> <pre><code>body {background:url('images/back.jpg');} </code></pre> <p><strong>After</strong></p> <pre><code>html, body {background:url('images/back.jpg');} </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload