SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Resize problem with Centered DIV on centered background in IE6

  1. #1
    SitePoint Member
    Join Date
    Jul 2004
    Location
    Germany
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Resize problem with Centered DIV on centered background in IE6

    Help!

    Have a look at the following simple file:
    http://www.kopfteam.com/specials/callcenter/test.html

    Source code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

    <head>
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
    <title>Test</title>
    <style type="text/css">
    body {
    background: #354452 url(http://www.kopfteam.com/specials/cal.../bg_center.gif) repeat-y center;
    text-align: center;
    margin: 0;
    padding: 0;
    }
    #container {
    text-align: left;
    margin-top: 0;
    margin-right: auto;
    margin-bottom: 0;
    margin-left: auto;
    padding: 0;
    border: none;
    width: 762px;
    background: red;
    }
    </style>
    </head>

    <body>
    <div id="container">
    A lot of text <br />
    A lot of text <br />
    A lot of text <br />
    A lot of text <br />
    A lot of text <br />
    A lot of text <br />
    A lot of text <br />
    A lot of text <br />
    A lot of text <br />
    A lot of text <br />
    A lot of text <br />
    A lot of text <br />
    </div>
    </body>
    </html>

    Using IE6 slowly resize your browser window. You will see the red box 'jump' horizontaly one pixel from the left to the right and back.

    What's going on?

    Thanks for your help!
    Floh

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    SitePoint Award Recipient Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    37,872
    Mentioned
    103 Post(s)
    Tagged
    3 Thread(s)
    Hi,

    Sorry I missed your post

    Although your links not active anymore it sounds like one of ie's rounding bugs. As the screen gets smaller the odd pixels get rounded up and make things bigger than they should be.

    I expected its the margin:autos being rounded up that causes this behaviour.

    You can see ie's rounding problems if you have 2 floats of 50% next to each other then slowly make the screen smaller. You will see that one float will jump up and down on each odd pixel size. Whic is why most people always set one float slightly smaller to compensate.

    Paul

  3. #3
    Non-Member Prosubmit's Avatar
    Join Date
    Aug 2003
    Location
    oh
    Posts
    299
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I had this problem with the newest update of IE, Go to add/remove programs and revert back to your last version before the IE windows update. When i did this it displayed corectly!

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
  •