How to use display: block; In CSS
This CSS rule will apply the display: block;
property to elements with the class .inline-to-block
, making them behave like block-level elements. Block-level elements typically start on a new line and take up the full width of their container.
Syntax:
/* Changing an inline-level element to a block-level element */
.inline-to-block {
display: block;
}