G'day all,

I've run into a bug that's (of course) only affecting IE6, but I'm  
interested to see if anyone else has a better fix for me. You can see  
the bug in action at http://www.iqmultimedia.com.au/kit/displaynonebug.html

The test is a fixed-width container (with overflow:hidden) with four  
child elements (all set to float: left) of fixed width. One item is  
set to display: none. Despite IE not leaving any gap where that item  
is in the markup (between the two vertical grey columns), it  
determines that it cannot fit the green box into the remaining space.  
The bottom test shows the same markup but with 'display: none'  
replaced with 'width: 0'.

The basic concept is that IE miscalculates the width of floated items  
with display: none set. If I set the width of the item to zero (with  
an overflow: hidden addition), the three items fit in the space  
perfectly in all tested browsers (IE6, Safari 3.1, Firefox 2+3, Opera  
9).

I'm using Javascript to set the display properties programmatically  
based on certain conditions in my real usage scenario. I can use the  
workaround, but it's much less clean.

A quick Google shows others with the issue; none with this specific  
workaround, and no obvious alternative workaround. If someone knows of  
one, please, please let me know!

Cheers,


Kit Grose
Frontend Web Developer
iQmultimedia

[EMAIL PROTECTED]
iqmultimedia.com.au


______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to