Skip to content
Solais Labs

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.

Mateo Okafor
Tariq Haddad
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 Prague 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
Pro
Renews
Jan 16, 2027
Amount
$48.15

11Hide when printing

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

Invoice #ORD-2595

Printed copy - Solais Labs

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.

Three days of keynotes, hands-on workshops and evening meetups. Friendly people answer your questions quickly, by phone, chat or email.

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.

Solais Labs ships with Hands-on workshops and Hands-on workshops 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).

  • Kenji Mensah - Finance Lead
  • Omar Quinn - Backend Engineer
NameRole
Kenji MensahFinance Lead
Omar QuinnBackend Engineer

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.