Display

Set the display box type of an element.

Widely available

This feature is well established and works across many devices and browser versions.

Chrome
Edge
Firefox
Safari
Something went wrong while fetching the data.

Usage

Inline

Display the element as an inline element.

<div class="d-i ...">A</div>

Block

Display the element as a block-level element.

<div class="d-b ...">A</div>

Flex

Display the element as a flex container.

<div class="d-f ...">A</div>

Flow Root

Create a new block formatting context.

<div class="d-fr ...">A</div>

Grid

Display the element as a grid container.

<div class="d-g ...">A</div>

Inline Flex

Display the element as an inline flex container.

<div class="d-if ...">A</div>

Inline Block

Display the element as an inline-block element.

<div class="d-ib ...">A</div>

Inline Grid

Display the element as an inline grid container.

<div class="d-ig ...">A</div>

Inline Table

Display the element as an inline table.

<div class="d-it ..."></div>

Table

Display the element as a block-level table.

<div class="d-t ..."></div>

None

Hide the element from the layout.

<div class="d-none ...">A</div>

Responsiveness

Use breakpoint prefixes to target different screen sizes. Styles apply from the breakpoint & up.

Target viewport sizes with breakpoint prefixes.

sm:d-*
Small640px
md:d-*
Medium768px
lg:d-*
Large1024px
xxl:d-*
Extra Large1536px

Hover State

Apply styles conditionally on hover using the h: prefix.

Add the h: prefix to apply styles only when the user hovers over the element.

Syntax:h:d-*