Search
Active

1
Sign in to vote
0
Sign in to vote
Sign in
to vote
Type: Bug
ID: 494080
Opened: 9/30/2009 2:58:09 AM
Access Restriction: Public
1
Workaround(s)
0
User(s) can reproduce this bug
When IE should collapse a margin betwee two elements because an element between the two get deleted, it sometimes fails to do so, and simply *delete* the margins. The margins reappears when we force IE to restyle the DOM by pressing CTRL+A.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TD/html4/strict.dtd">
<html>
    <head>
        <title>Test HTML : Collapsing margin while deleting elements</title>
        <style><!--
        
            .box {
                border: 5px solid black;
                padding: 0px;
                width: 500px;
                background: #223322;
                text-align: center;
                margin: 10px 0px;
            }
            
            .first, .last {
                background: green;
                height: 20px;
                color: white;
                font-weight: bold;
            }
            
            .first {
                margin-bottom: 30px;
            }
            
            .last {
                margin-top: 30px;
            }
            
        --></style>
    </head>
    <body>
        Green boxes and black boxes should never share a border. <br/><br/>
    
        <div class="box">
            <div class="first">First</div>
            <input type="button" onclick="this.parentNode.removeChild(this)" value="Delete me!" />
            <div class="last">Last</div>
        </div>
        
        <div class="box">
            <div class="first">First</div>
            <center>
                <input type="button" onclick="this.parentNode.parentNode.removeChild(this.parentNode)" value="Delete me!" />
            </center>
            <div class="last">Last</div>
        </div>
        
        <div class="box">
            <div class="first" style="border-bottom: 1px solid lime">First</div>
            <center>
                <input type="button" onclick="this.parentNode.parentNode.removeChild(this.parentNode)" value="Delete me!" />
            </center>
            <div class="last" style="border-top: 1px solid lime">Last</div>
        </div>

    </body>
</html>
Details (expand)

Please verify that this issue occurs in Internet Explorer 8 RTW. Click here for more information.
Yes, this issue is reproduced in IE8 RTW.

1. What seems to be the problem? Click here for more information.
There is a standards issue in Internet Explorer.

2. What area did the issue occur in? Click here for more information.
----Web page displays incorrectly

3. What language of your browser's frame? Click here for more information.
French

3a. What is your language preference order? Click here for more information.
fr-be fr-fr en-us
 

Please try to reproduce this issue in No Add-ons mode and answer the following 2 questions. You can find the No Add-ons shortcut under All Programs > Accessories > System Tools > Internet Explorer (No Add-ons).  Click here for more information.


4.  What was the result of the issue after trying it in No Add-ons mode?
The issue reproduces in No Add-ons mode

5. If running in No Add-ons mode solves your issue, what kind of Add-ons are you using?
 

5a. If Other, then please list the add-on:
 


6. How often does this happen? Click here for more information.
Sometimes Happens

7. What Operating System are you running? Click here for more information.
Windows XP SP3

8. Have you ever seen this problem before in Internet Explorer? Click here for more information.
This is new to IE8 RTW

9. Where does this occur?  Click here for more information.
IE8: Default Mode

9a. Please provide the URL of the internet application being used.
http://cid-201f3835d49587fe.skydrive.live.com/self.aspx/Public/Temp/test%5E_margin.html


10. Please list the reproduction steps. Click here for more information.
Load the page.
Click on the "Delete me!" button, beginning by the first.

11. What are the expected results? Click here for more information.
The button should dispear. The margin before the button and the one after it should collapse, but not dispear.

12. What are the actual results? Click here for more information.
The margins get deleted. Worse the margins outside the 'black box' get deleted, too.
File Attachments
0 attachments
Sign in to post a comment.