SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Feb 2011
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Does anybody help me to figure out what is the matter.

    Hello everyone
    I create a test page with only a div.
    Code:
    <body>
    
    <div class="aa">
    
    </div>
    </body>
    
    the css style for this page is below:
    *
    {
    	margin: 0px 0px;
    	border: 0px 0px;
    	padding: 0px 0px;
    }
    
    
    .aa
    {
    width: 400px;
    height: 200px;
    background:url(./images/blue_skin.png) repeat-x 0px -294px; /* only part of the image will be the background */
    }
    the background image is in the attachment.

    i am confused that when I zoom the page size to 125% on IE8, the background has an extra line that is the first row of the image appearing under the background.

    does anybody tell me why?

    thanks very much.
    blue_skin.png

    the result looks like this
    result.png
    Last edited by molona; Feb 23, 2011 at 01:01. Reason: add result image

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,526
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    Hi, it looks to be another bug with IEs zoom and when you zoom it gets confused and seems to round an extra pixel into the mix which it repeats from the top of the image.

    The solution would be to have a 1 or 2px transparent gap at the top of the sprite so that when it wraps the extra pixel doesn't show.

  3. #3
    SitePoint Member
    Join Date
    Feb 2011
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks Paul very much!
    i do just as you say and it works..

    but i don't know the reason and i can't find any related info about this issue.

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,526
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by lambokini View Post
    thanks Paul very much!

    but i don't know the reason and i can't find any related info about this issue.
    It's just another undocumented bug although we have run into versions of it on the forum before. Ie is very buggy with zoom (as are a lot of browsers) and there are always rounding issues.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •