Bill Brown wrote:
> ...
> Try this:
> ul, li {
>    list-style: none;
>    margin:     0;
>    padding:    0;
>    }
> ul {
>    display:    inline-block; /* IE Float Clear, Part 1 */
>    overflow:   hidden;       /* Float Clear */
>    }
> ul {
>    display:    block;        /* IE Float Clear, Part II */
>    }
> li {
>    display:    inline;       /* IE Double Margins Bug Fix */
>    float:      left;
>    padding:    0 10px 0 0;
>    }
> 
> That should put anything after the UL below the UL. The only time this 
> fix won't work obviously is if you're using a fly-out menu. In that 
> case, you can leave the IE fix in place, but would need to adjust the 
> fix for other browsers using the :after pseudo element on the UL.
> 

I would not recommend this inline-block/block trip-switch combination. 
It is complicated, and someone who does not know about this peculiar 
hasLayout-sidenote (that is, display:inline-block sets haslayout in a 
silent way that cannot be reset later on) won't understand it no matter 
what or how much you are commenting at its side.

For the 17 lines of code, 5 are just because of IE 6. From an conformant 
browser's point of view, the code is hermetic and makes not much sense.

To makes things worse, the overflow-clearing is far from 
self-explaining. So maintaining this code will lead to further questions 
or further bugs. It should not be that difficult to clear something in CSS.

I'm not saying the code would be bad or would not work. I am using the 
word "hermetic" here as "Those who could understand this code would not 
have to ask for it."

Ingo

-- 
http://www.satzansatz.de/css.html
http://www.dolphinsback.com
______________________________________________________________________
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