![]() |
VOOZH | about |
This class accepts more than one value in Tailwind CSS. All the properties are covered in a class form. It is the alternative to the CSS display property. This class is used to define how the components (div, hyperlink, heading, etc) are going to be placed on the web page. As the name suggests, this property is used to define the display of the different parts of a web page.
Class Name | Description |
|---|---|
block | Display an element as a block element. |
inline-block | Display an element as an inline-level block container. |
inline | Display an element as an inline element. |
flex | Display an element as a block-level flex container. |
inline-flex | Display an element as an inline-level flex container. |
table | Set the behavior as <table> for all elements. |
table-caption | Set the behavior as <caption> for all elements. |
table-cell | Set the behavior as <td> for all elements. |
table-column | Set the behavior as <col> for all elements. |
table-column-group | Set the behavior as <column> for all elements. |
table-footer-group | Set the behavior as <footer> for all elements. |
table-header-group | Set the behavior as <header> for all elements. |
table-row-group | Set the behavior as <row> for all elements. |
table-row | Set the behavior as <tr> for all elements. |
flow-root | Set the default value. |
grid | Display an element as a block-level grid container. |
inline-grid | Display an element as an inline-level grid container. |
contents | Disappear the container. |
hidden | Remove the element. |
It is used to display an element as a block-level element. This class is used as the default property of div. This class places the div one after another vertically. The height and width of the div can be changed using the block class if the width is not mentioned, then the div under block class will take up the width of the container.
Syntax:
<element display="block">...</element>Example 1:
Output:
π ImageIt is used to display an element as an inline-level block container. This feature uses both properties mentioned above, block and inline. So, this class aligns the div inline but the difference is it can edit the height and the width of the block. Basically, this will align the div both in the block and inline fashion.
Syntax:
<element display="inline-block">...</element>Example 2:
Output:
π ImageIt is used to display an element as an inline element. This class is the default property of anchor tags. This is used to place the div inline i.e. in a horizontal manner. The inline display property ignores the height and the width set by the user.
Syntax:
<element display="inline">...</element>Example 3:
Output:
π ImageThe flex class is much responsive and mobile-friendly. It is easy to position child elements and the main container. The margin doesnβt collapse with the content margins. The order of any element can be easily changed without editing the HTML section.
Syntax:
<element display="flex">...</element>Example 4:
Output:
π Image