In the below test case a gray container wraps 3 divs: a green, an orange and a blue one.
In IE6- the presence of the hasLayout orange child prevents the shrink-wrapping effect on the container. In IE7 this has been corrected, but now the orange box incorrectly shrink wraps its content (i.e. it doesn't have the same width as its siblings.)
In the below test case hasLayout has been removed on the orange child, IE works correctly.
IE7 has other problems with shrink-to-fit containers. Below the orange box has width:50% (note that even width:100% doesn't fix the problem of the 'extra' shrink of the child.)
And now it has width:5% (it seems to use body as reference)
With a right float inside the container
With a right float inside the hasLayout child