CSS <display-outside> Data Type
The <display-outside> data type is the outer display type, which sets how an element takes part in its parent's layout: block, inline or run-in.
Description
The <display-outside> CSS data type represents the keywords that set an element's outer display type: how the element's box takes part in the layout of its parent. It is one half of the two-value syntax of the display property, the other half being <display-inside>, which sets how the element lays out its own children.
There are three keywords. block makes the box start on a new line and, by default, fill the available width, like a paragraph or div. inline makes the box flow within a line of text, sitting next to neighbouring words and inline elements, like a span. run-in was intended to merge a box into the start of the following block, but it is not supported in current browsers.
Familiar single-keyword values are shorthands for a combination of outer and inner types. For example, display: block is display: block flow, display: inline-block is display: inline flow-root, and display: inline-flex is display: inline flex. If only an outer keyword is given, the inner type defaults to flow.
Examples:
/* Single-keyword syntax */
.card { display: block; }
.badge { display: inline; }
/* Two-value syntax: outer + inner */
.toolbar { display: inline flex; } /* same as inline-flex */
.panel { display: block grid; } /* same as grid */
Interactive Demo
Text before the span and text after it, which wraps onto the next line.
Syntax
<display-outside> = block | inline | run-in
Values
- blockThe element generates a block box, which starts on a new line and creates line breaks before and after it in normal flow.
- inlineThe element generates one or more inline boxes that flow with the surrounding text, without line breaks before or after.
- run-inThe element generates a run-in box that merges into the following block. Not supported in current browsers.
Example
Browser Support
The following information will show you the current browser support for the CSS display-outside data type. Hover over a browser icon to see the version that first introduced support for this CSS data type.
Desktop





Tablets & Mobile





