IE7-/Win: Time dependence of the disappearing of absolutely positioned boxes near to floats and clears

In IE7-/Win an absolutely positioned box sometimes disappears when in the source code it is the previous or the next sibling of a float. Different test cases and some fixes are shown in IE7-/Win: floats and disappearing absolutely positioned boxes.

The problem seems "time-dependent", i.e. it is influenced by the timing of the arrival of the data to the browser and by the rendering speed. In this page the test cases are repeated with and without some javascript added in markup after the AP box. When the delay introduced by the script is sufficient the AP box appears. Of course this may depend on other factors (like PC speed), so what you see may differ from my stated results.

In the following test cases a relative positioned box (having hasLayout) contains, in the source code:

The first two cases differ only for the relative order (in the source code) of the AP box and the float. In both of them the AP box disappears (i.e. it is not rendered by IE/Win.)

Test 1: The AP box precedes the float.

Test 2: The float precedes the AP box.

The same cases, with a javascript after the AP box, which executes a loop, just to take some CPU time. The AP box is now rendered by IE7-/Win.

Test 1b

Test 2b

CSS tests home