Skip to content

Display

Display utilities switch the CSS display value: d-none, d-inline, d-inline-block, d-block, d-grid, d-flex, d-inline-flex and the table values. Add a breakpoint (d-md-flex, d-lg-none) to show, hide or re-flow an element from a screen size up, and d-print-* to control what appears on paper.

1Inline versus block

d-inline elements sit side by side and ignore width; d-block elements take a full row.

d-inline
d-inline
d-block d-block

2Inline-block tiles

d-inline-block flows like text but accepts width, height and padding.

A width 120px C

3Hide on small screens

d-none d-sm-block shows an element only from the sm breakpoint up.

Lea Lindqvist
Maya Hughes
Hidden below sm

4Show only on phones

d-md-none shows a mobile-only element that disappears from md.

Swipe the table sideways to see more columns.
All columns fit on this screen.

5Visibility per breakpoint

Each label is visible on one breakpoint range only; resize to see which one shows.

xs sm md lg xl xxl current breakpoint

6d-flex container

d-flex turns children into flex items laid out in a row.

one
two
three

7d-inline-flex

d-inline-flex makes a flex container that only takes the width it needs.

Text before Cape Town and text after.

8d-grid

d-grid with gap stacks children in a single column grid, great for full width buttons.

9Responsive grid buttons

d-grid on phones, d-md-flex from md: buttons go full width on small screens and inline later.

10Table display

d-table, d-table-row and d-table-cell lay out divs like a table.

Plan
Team
Renews
Dec 31, 2026
Amount
$25.81

11Hide when printing

d-print-none hides buttons and navigation on paper; d-none d-print-block shows print-only text.

Invoice #PO-7360

Printed copy - Brand name 18

12Icon only on phones

The label hides below md with d-none d-md-inline while the icon stays.

13Sidebar only on large screens

The aside uses d-none d-lg-block, so the main column takes the full width on smaller screens.

A focused dashboard helps the whole team on the same page wherever you are. Our nutrition plans guides data easy to understand for teams of every size.

14Block links

d-block on links makes the full row clickable.

15Responsive two column form

d-block on phones, d-sm-flex from sm, keeps label and input stacked until there is room.

16Inline-block badges in text

Small d-inline-block chips stay inside a sentence.

Brand name 18 ships with Modern equipment and Certified coaches out of the box.

17Swap layout at a breakpoint

A compact list on phones (d-md-none) and a table from md (d-none d-md-block).

  • Arjun Duarte - Operations Manager
  • Maya Varga - Content Writer
NameRole
Arjun DuarteOperations Manager
Maya VargaContent Writer

18Centre with d-flex

d-flex, align-items-center and justify-content-center centre content in both directions.

Centred

19Hide an empty slot

d-none removes an element completely; it takes no space, unlike invisible.

A
B
C (B has d-none)

20Toolbar that collapses

Secondary tools use d-none d-lg-flex and a single More button shows on smaller screens.