Philippe wrote:
> [------- Le 02/02/2006 19:38, Ingo Chao a écrit : -------]
>>    .clear_solvent {float:left; width:0px; height:0px;}
>>
>>    <div id="right-float-1">
>>     <p>This div is floated to the right.</p>
>>     <p>Lorem ipsum dolor sit amet,...</p>
>>    </div>
>>
>>    <p><strong>This paragraph is not floated ...</strong></p>
>>
>>    <div class="clear_solvent"><!----></div>
>>
>>    <div id="right-float-2">
>>     <p>This div is floated ...</p>
>>    </div>
>>
>>    <p><strong>This paragraph is not floated and sits in the source 
>> after the second right float. ...</strong></p>



> 1) I had to applied a style="margin-left: -3px" to div.clear_solvent to 
> avoid the second paragraph that is not floated to have an unexpected 
> (very small) left margin in IE6.
>      .clear_solvent  {
>         float: left;
>         width: 0;
>         height: 0;
>         margin-left: -3px;
>       }


Philippe,

nice catch, I forgot to correct the IE6 3px text jog.

> 2) As we are compelled to include an additional div.clear_solvent that 
> is empty and is only necessary to IE. In the HTML, we can nclue it in a 
> Conditional Comment so that only IE will see that div:
> 
>       <!--[if IE]>
>       <div class="clear_solvent"></div>
>       <![endif]-->
> 
>  (I have deleted the comment inside the div.clear_solvent to avoid 
> </div> to be seen by other browsers.)
> 

I am undecided.

While I don't expect this little additional element to cause problems, 
one can never know, so hiding it from the others is probably save.

On the other hand, this clear_solvent method would be used in tight 
float settings. These tight floats sometimes cause the duplicated 
characters bug in IE6 (and still in IE7b2, btw.), or worse, are crashing 
IE, although in very rare cases. An additional comment, in combination 
with other comments, may induce this dup character bug too in IE6 (this 
part of the bug is fixed in IE7b2).

So this innocent looking documentation attempt

  <!-- This element fixes the isthereanameforit-bug -->
  <!--[if IE]>
    <div class="clear_solvent"></div>
  <![endif]-->

may cause problems that are difficult to debug. Authors are baffled when 
IE6 kicks one or two characters into the screen where they don't belong to.

   (
Or, I haven't had time to test it, are we allowed to add a comment 
phrase /inside/ the conditional comment?

    <!--[if expression] comment_phrase > HTML <![endif]-->
or
    <!--[if expression]> HTML <![endif] comment_phrase -->

I don't know, and I did not find a mention of it in [1].


Next thing I haven't tested: The internal comment was meant to provide 
IE6 from expanding this element in height by the inherited line-height.

   <div class="clear_solvent"><!----></div>

But this is probably irrelevant here.
   )



Anyway, your variant is looking promising. Thanks so much!

Thanks to all who are testing this bugfix.

Ingo

[1] 
http://msdn.microsoft.com/workshop/author/dhtml/overview/ccomment_ovw.asp

-- 
http://www.satzansatz.de/css.html
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to