Display properties and alignment
Display helpers and alignment helpers form an important aspect of Bootstrap's utility classes. The latter are classes that allow you to quickly set the display property of an element, while alignment utilities can be used to change the vertical alignment of elements whose display property is set to either inline
or inline-block
. Let's look at each type of helper class individually.
Display helpers
Display helper classes allow you to quickly set the display
property of an element, and in the previous chapters we have already come across some of these helper classes (for example, d-none
). The classes are prefixed with the letter d
, followed by a dash and the name of the property value to which you wish to set the element's display
:
d-none
is akin to writingdisplay: none;
and hides the given elementd-block
is akin to writingdisplay: block;
and will force the element to which it is applied to span the full width of the available spaced-inline
is akin to writing...