This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 16113 - How horizontal margins of a BFC block adjacent to a floated block should be rendered
Summary: How horizontal margins of a BFC block adjacent to a floated block should be r...
Status: NEW
Alias: None
Product: CSS
Classification: Unclassified
Component: CSS Level 2 (show other bugs)
Version: unspecified
Hardware: All Windows 3.1
: P2 normal
Target Milestone: ---
Assignee: Bert Bos
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-24 19:29 UTC by Gérard Talbot
Modified: 2012-12-04 00:51 UTC (History)
1 user (show)

See Also:


Attachments

Description Gérard Talbot 2012-02-24 19:29:17 UTC
Test and demo pages
-------------------
A)
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/marges-contexte-formatage.html

B)
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/Floats-And-BFCs-With-Margins-AG.html


Thread
------

[CSS21] Floats, overflow: hidden, BFCs and margins
http://lists.w3.org/Archives/Public/www-style/2012Feb/0954.html

Excerpts of current spec
------------------------

"
In a block formatting context, each box's left outer edge touches the left edge of the containing block (for right-to-left formatting, right edges touch). This is true even in the presence of floats (although a box's line boxes may shrink due to the floats), unless the box establishes a new block formatting context (in which case the box itself may become narrower due to the floats). 

(...)

The border box of a table, a block-level replaced element, or an element in the normal flow that establishes a new block formatting context (such as an element with 'overflow' other than 'visible') must not overlap the margin box of any floats in the same block formatting context as the element itself. If necessary, implementations should clear the said element by placing it below any preceding floats, but may place it adjacent to such floats if there is sufficient space.
"


Expected result
---------------

The CSS2.1 spec should indicate how horizontal margins of the orange BFC should be rendered, especially
- the left margin of the non-floated BFC in tests #1, #2 and #4 of marges-contexte-formatage.html
- the right margin of the non-floated BFC in tests #4 and #5 of marges-contexte-formatage.html
- the right margin of the non-floated BFC in all 8 sub-tests of Floats-And-BFCs-With-Margins-AG.html

Credits go to Florent Verschelde for his original article on this issue.

regards, Gérard
Comment 1 Anton P 2012-05-21 11:13:41 UTC
I propose closing moving this bug to CSS3-box, as explained in http://lists.w3.org/Archives/Public/www-style/2012May/0708.html