CSS Display is a module of CSS that defines how the CSS formatting box tree is generated from the document element tree and defines properties controlling it.
display: block
, display: inline
)display: flex
display: grid
Specification | Status | Comment |
---|---|---|
CSS Display Module Level 3 The definition of 'display' in that specification. | Working Draft | Added run-in , flow , flow-root , contents and multi-keyword values. |
CSS Level 2 (Revision 1) The definition of 'display' in that specification. | Recommendation | Added the table model values and inline-block . |
CSS Level 1 The definition of 'display' in that specification. | Recommendation | Initial definition. Basic values: none , block , inline and list-item . |
In addition to the CSS Display Specification Level 3, further specifications define the behavior of various values of display.
Desktop | ||||||
---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
Basic support | 1 | 12 | 1 | 4 | 7 | 1 |
Multi-keyword values | ? | ? | No | No | ? | ? |
list-item |
1 | 12 | 1 | 6 | 7 | 1 |
inline-block |
1 | 12 | 1 | 8
|
7 | 1 |
inline-table |
1 | 12 | 3 | 8 | 7 | 1 |
table , table-cell , table-column , table-column-group , table-footer-group , table-header-group , table-row , and table-row-group
|
1 | 12 | 1 | 8 | 7 | 1 |
flex |
29
|
12 | 20
|
11
|
16
|
9
|
inline-flex |
29
|
12 | 20
|
11
|
16
|
9
|
grid
|
57 | 16
|
52 | 10
|
44 | Yes |
inline-grid
|
57 | 16
|
52 | 10
|
44 | ? |
subgrid
|
No | No | No | No | No | No |
ruby , ruby-base , ruby-base-container , ruby-text , and ruby-text-container
|
? | 12 | 38
|
? | ? | ? |
run-in
|
1 — 32
|
No | No | 8 | 7 — 15 | 1 — 8
|
flow-root
|
58 | ? | 53 | ? | 45 | ? |
contents
|
65
|
No | 37
|
No | 52 | 11.1 |
contents : Specific behavior of unusual elements when display: contents is applied to them
|
? | No | 59 | No | No | No |
-moz-box and -moz-inline-box
|
No | No | Yes
|
No | No | No |
-moz-grid , -moz-inline-grid , -moz-grid-group and -moz-grid-line
|
No | No | ? — 62 | No | No | No |
-moz-stack and -moz-inline-stack
|
No | No | ? — 62 | No | No | No |
-moz-deck
|
No | No | ? — 62 | No | No | No |
-moz-popup
|
No | No | ? — 62 | No | No | No |
Mobile | |||||||
---|---|---|---|---|---|---|---|
Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
Basic support | Yes | Yes | 12 | 4 | Yes | Yes | Yes |
Multi-keyword values | ? | ? | ? | No | ? | ? | ? |
list-item |
Yes | Yes | 12 | 4 | Yes | Yes | Yes |
inline-block |
Yes | Yes | 12 | 4 | Yes | Yes | Yes |
inline-table |
Yes | Yes | 12 | 4 | Yes | Yes | Yes |
table , table-cell , table-column , table-column-group , table-footer-group , table-header-group , table-row , and table-row-group
|
Yes | Yes | 12 | 4 | Yes | Yes | Yes |
flex |
4.4
|
29
|
12 | 20
|
16
|
9
|
Yes |
inline-flex |
4.4
|
29
|
12 | 20
|
16
|
9
|
Yes |
grid
|
57 | 57 | 16
|
52 | 44 | Yes | 7.0 |
inline-grid
|
57 | 57 | 16
|
52 | 44 | ? | 7.0 |
subgrid
|
No | No | No | No | No | No | No |
ruby , ruby-base , ruby-base-container , ruby-text , and ruby-text-container
|
? | ? | 12 | 38
|
? | ? | ? |
run-in
|
? — 4.4.3
|
? — 32
|
No | No | ? | ? — 8
|
? |
flow-root
|
58 | 58 | ? | 53 | 45 | ? | 7.0 |
contents
|
65 | 65 | No | 57 | 52 | 11.1 | No |
contents : Specific behavior of unusual elements when display: contents is applied to them
|
? | ? | No | 59 | No | No | ? |
-moz-box and -moz-inline-box
|
No | No | No | Yes
|
No | No | No |
-moz-grid , -moz-inline-grid , -moz-grid-group and -moz-grid-line
|
No | No | No | ? — 62 | No | No | No |
-moz-stack and -moz-inline-stack
|
No | No | No | ? — 62 | No | No | No |
-moz-deck
|
No | No | No | ? — 62 | No | No | No |
-moz-popup
|
No | No | No | ? — 62 | No | No | No |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Display