Solution (Clean Solution)
Date of the Solution
Sun Jul 19 17:20:24 2009
Fixed Versions
all of the affected
Description
As I've mentioned earlier, the bug can be fixed by giving your list items "layout", but that would cause them to fail to shrink-wrap, which may be the reason for why you are floating that <div> in the first place. Let's take a look at the fixed demo:
Due to the nature of the bug, fixed demo is shown on a separate page.
- HTML Code:
<div>
<ul>
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
</div>
<div>
<dl>
<dt>Foo:</dt>
<dd>Bar</dd>
<dt>Baz:</dt>
<dd>Ber</dd>
</dl>
</div>
- CSS Code:
div {
float: left;
position: relative;
clear: left; /* not related to the bug */
}
dt, dd, li {
background: #f00;
position: relative;
}
The bug is fixed by setting position property to value relative on our list items. Simple and clean.