Search⌘ K
AI Features

Display

Explore how to apply Bootstrap 5 display classes to control element visibility and layout such as hiding elements with d-none or making them block or inline. Learn to use responsive breakpoints and print-specific display classes to customize content presentation across devices and printing scenarios.

The display class

When using CSS, we use display properties. They can have different values such as none, inline, block, and more. Let’s learn how we can incorporate these properties using Bootstrap.

The Display Class in Bootstrap

CSS Style

Bootstrap Class

display: none;

.d-none

display: inline;

.d-inline

display: block;

.d-block

display: inline-block;

.d-inline-block

display: table;

.d-table

display: table-cell;

.d-table-cell

display: table-row;

.d-table-row

display: flex;

.d-flex

display: inline-flex;

.d-inline-flex

These classes are not incorporated directly into Bootstrap components. The display property is mostly ...