Skip to content Skip to sidebar Skip to footer

A 1 Pixel Gap Only Coming On Ipad But Fine On Safari And Chrome

Here at this line after clouds which will be only visible in iPad or iPhone. Any idea how to solve it? It's fine in all other desktop browsers. CSS #banner-inner { height: 270px;

Solution 1:

This seems to be a bug of the WebKit rendering engine on the iPad, when the page scale factor is less than 1.0. If you keep the page scale factor above 1.0, then the pixel gap does not show up. This can be done with a meta tag:

<metaname="viewport"content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, width=device-width">

I also found a simple page that demonstrate a similar issue (a rendering glitch on iPad only):

In the past, there have been a number of bugs reported for rounding issues in the WebKit engine:

Solution 2:

If disabling zoom is not wanted, and if the margin trick does not work (it probably works with background colors, but I could not get it to work with background images), here is another solution:

Make all background images 1 or 2 px bigger (cut them so they contain a 1 px duplicate of the graphics above/below), and use css background-size and background-position to ensure that the extra (unwanted) pixel is not shown - it will then only be used if the browser needs that extra pixel to cover the rendering gap.

Tested to fix the rendering bug on Android's 2.3's default browser (will test on iPhone & iPad on monday), plus zooming errors in Chrome on PC.

Solution 3:

I also solved the iOS sub pixel gap issue (on a full screen site) by using overflow-x: hidden; to stop side ways scrolling & viewpoint scale to stop pitch zooming. I also had holder divs set at width: 101%; and all the elements/image divs inside set to float: left;. This means the sub pixel gaps are all on the left hand site but pushed out of view by the holder div set at 101% width.

Solution 4:

Try this

#wrapper {
     margin: -2px auto;
... rest of your css....

}

may be there is a small resolution problem also so try this also

#wrapper {
    background-color: #fff;
... rest of your css....

}

one of them has to work :)

UPDATE:

I think i got it,

remove#wrapper background-color;remove#banner-switcher background: 

Solution 5:

Try to set the the height of the #banner in PX not in EM And the hieght of cloud is 112px en 113px not 111px for both.

Post a Comment for "A 1 Pixel Gap Only Coming On Ipad But Fine On Safari And Chrome"