Recently some old pages of mine showed a problem in Chrome. I applied a
quick fix, but now I'm trying to understand better and extracted this
minimal test case http://brunildo.org/test/chrome_grr5.html .
There is a fixed-width grey container with inside:
  - a blue float,
  - a red box which clears the float, has overflow:hidden, and a negative
right margin.

In all recent browsers (except Chrome) the red box extends outside the grey
container (it is wider than it).  Not so in Chrome where it is as wide as
the container.
This seems somehow loosely related to
http://www.w3.org/TR/CSS21/visuren.html#bfc-next-to-float where it says
that a box establishing a new block formatting context (like the red one)
may become narrower to avoid overlapping with a float. But there is no risk
of overlapping here, the box explicitly clears the float.

There are several workarounds, but I'm curious to know if you think that
this Chrome behavior is allowed by the spec.
BTW: Older than current versions of Chrome behaved like the other browsers,
but I did not check the exact version numbers.

Bruno
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
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