Valentin Agachi wrote: > Can anyone explain to me why is the following bug happening? > > http://agachi.name/tests/float-and-absolute.htm > > An interesting issue is the fact that the bug is triggered by > the height of the main column and of the left float.
It's a very interesting bug, or probably combination of several bugs. I've no real idea of the whys, I just would like to add some small comments. 1) Most (all?) of the problems that you see in Opera 6 (and I believe in NS 7 as well, though I cannot test now) are a consequence of the fact that in these browsers overflow:hidden on the wrapper does not make it to enclose the floats. Add a solid clear at the end of the wrapper: <div style="clear:both"> </div>, and the problems should disappear. 2) IE/Win is indeed very buggy here. Relative elements without 'hasLayout' [1] do not work well. If you give 'layout' to the relative column most problems seem fixed. They are probably at least of two different types: - Even in absence of floats, relative elements without 'hasLayout' do not act correctly as reference for positioning of absolute elements (at least for the right and bottom positioning.) - Relative elements without 'hasLayout' following floats behave badly by themselves, and (as you noticed) differently depending on their height compared to the float height. Remove the left margin from the main column (and the background color from the float, to better see what happens.) You will see wrong positionings of that main column (especially if you try to offset it using left.) Best regards, Bruno [1] http://www.satzansatz.de/cssd/onhavinglayout.html ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
