You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: files/en-us/web/css/guides/display/block_formatting_context/index.md
+3-6Lines changed: 3 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,16 +13,15 @@ A block formatting context is created by at least one of the following:
13
13
- The root element of the document (`<html>`).
14
14
- Floats (elements where {{ cssxref("float") }} isn't `none`).
15
15
- Absolutely positioned elements (elements where {{ cssxref("position") }} is `absolute` or `fixed`).
16
-
- Inline-blocks (elements with {{cssxref("display", "display: inline-block")}}).
16
+
- Inline-blocks (elements with {{cssxref("display", "display: inline-block")}}). This is the default display type for {{htmlelement("button")}} and button {{htmlelement("input")}} elements.
17
17
- Table cells (elements with {{cssxref("display", "display: table-cell")}}, which is the default for HTML table cells).
18
18
- Table captions (elements with {{cssxref("display", "display: table-caption")}}, which is the default for HTML table captions).
19
19
- Anonymous table cells implicitly created by the elements with {{cssxref("display", "display: table")}}, `table-row`, `table-row-group`, `table-header-group`, `table-footer-group` (which is the default for HTML tables, table rows, table bodies, table headers, and table footers, respectively), or `inline-table`.
20
-
- Block elements where {{ cssxref("overflow") }} has a value other than `visible` and `clip`.
21
20
- Elements with {{cssxref("display", "display: flow-root")}}.
22
-
- {{htmlelement("button")}} elements and button {{htmlelement("input")}} types defaulting to `display: flow-root`.
23
-
- Elements with {{cssxref("contain", "contain: layout")}}, `content`, or `paint`.
24
21
- Flex items (direct children of the element with {{cssxref("display", "display: flex")}} or `inline-flex`) if they are neither [flex](/en-US/docs/Glossary/Flex_Container) nor [grid](/en-US/docs/Glossary/Grid_Container) nor [table](/en-US/docs/Web/CSS/Guides/Table) containers themselves.
25
22
- Grid items (direct children of the element with {{cssxref("display", "display: grid")}} or `inline-grid`) if they are neither [flex](/en-US/docs/Glossary/Flex_Container) nor [grid](/en-US/docs/Glossary/Grid_Container) nor [table](/en-US/docs/Web/CSS/Guides/Table) containers themselves.
23
+
- Block elements where {{ cssxref("overflow") }} has a value other than `visible` and `clip`.
24
+
- Elements with {{cssxref("contain", "contain: layout")}}, `content`, or `paint`.
26
25
- Multicol containers (elements where {{ cssxref("column-count") }} or {{ cssxref("column-width") }} isn't `auto`, including elements with `column-count: 1`).
27
26
- {{cssxref("column-span", "column-span: all")}}, even when the `column-span: all` element isn't contained by a multicol container.
28
27
@@ -56,8 +55,6 @@ With `display: flow-root;` on the `<div>`, everything inside that container part
56
55
57
56
The value name of `flow-root` makes sense when you understand you are creating something that acts like the `root` element (`<html>` element in browser) in terms of how it creates a new context for the flow layout inside it.
58
57
59
-
This is the default rendering for {{htmlelement("button")}} elements and button {{htmlelement("input")}} types meaning button's create a new BFC as long as their `display` value isn't set to a value that doesn't automatically create a new BFC.
0 commit comments