it seems to stem from floats inside of floats and becomes only visible if
overflow:hidden, I suppose. An updated sample:
(This is already a filed bug at webkit, I just wonder how people patch this
behaviour right now...)

<!DOCTYPE html>
<html>
<head>
    <title>float & width</title>


    <style type="text/css">

        div {

            float: left;

            height: 50px;
        }


        div.section {
            background-color: green;

        }

        div.section div.content {

            background-color: red;

            overflow: hidden;

        }

        p {
            clear: both;

        }

    </style>
</head>
<body>
<p>width: 0 => Bug</p>

<div class="section">

    <div class="content" style="width: 0;">some content that should
not affect this div's width.</div>
</div>
<p>width: 1px => good</p>

<div class="section">

    <div class="content" style="width: 1px;">some content that should
not affect this div's width.</div>
</div>
</body>
</html>

You are right, that it is the parent's width that's buggy. Yo do not
see any red and only green...

This seems so basic to me, I wonder what I could do...

- Show quoted text -

On Wed, Oct 13, 2010 at 12:19 AM, Thierry Koblentz <[email protected]> wrote:

> > This markup shows my problem:
> > Webkit browsers seem to create an erroneous width on overflow:hidden
> > elements inside of overflow:hidden elements, when their width is set to
> > 0.
>
> Interesting bug. But I see it differently.
> Webkit creates an erroneous width for the parent, not for the element with
> a
> 0 width.
> The DIV shows as green, right? Not as red (background color of the nested
> DIVs).
> Also, try to reduce the test case and you'll see that overflow:hidden does
> not have anything to do with this.
>
>
> --
> Regards,
> Thierry
> www.tjkdesign.com | www.ez-css.org | @thierrykoblentz
>
>


-- 
Jan

On Wed, Oct 13, 2010 at 12:19 AM, Thierry Koblentz <[email protected]> wrote:

> > This markup shows my problem:
> > Webkit browsers seem to create an erroneous width on overflow:hidden
> > elements inside of overflow:hidden elements, when their width is set to
> > 0.
>
> Interesting bug. But I see it differently.
> Webkit creates an erroneous width for the parent, not for the element with
> a
> 0 width.
> The DIV shows as green, right? Not as red (background color of the nested
> DIVs).
> Also, try to reduce the test case and you'll see that overflow:hidden does
> not have anything to do with this.
>
>
> --
> Regards,
> Thierry
> www.tjkdesign.com | www.ez-css.org | @thierrykoblentz
>
>


-- 
Jan
______________________________________________________________________
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