VOOZH about

URL: https://www.geeksforgeeks.org/html/tailwind-css-space-between/

⇱ Tailwind CSS Space Between - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Tailwind CSS Space Between

Last Updated : 23 Jul, 2025

This class accepts lots of values in tailwind CSS in which all the properties are covered as in class form. It is the alternative to the CSS Space Between property. This class is used for controlling the space between child elements.

Space Between classes:

  • space-y-0
  • space-y-reverse
  • -space-y-0
  • space-x-0
  • space-x-reverse
  • -space-x-0

Note: You can change the number "0" with the valid "rem" values.

space-y-0: This class is used to perform space on the y-axis.

Syntax:

<element class="space-y-0">...</element>

Example:

Output:

👁 Image

space-y-reverse: This class is used to perform reverse spacing on the y-axis, but have to use the flex-reverse class before that.

Syntax:

<element class="space-y-reverse">...</element>

Example:

Output:

👁 Image

-space-y-0: This class is used for negative spacing on the y-axis. By using this class we can place one element inside another element.

Syntax:

<element class="-space-y-0">...</element>

Example:

Output:

👁 Image

space-x-0: This class is used to perform space on the x-axis.

Syntax:

<element class="space-x-0">...</element>

Example:

Output:

👁 Image

space-x-reverse: This class is used to perform reverse spacing on the x-axis, but have to use the flex-reverse class before that.

Syntax:

<element class="space-x-reverse">...</element>

Example:

Output:

👁 Image

-space-x-0: This class is used for negative spacing on the x-axis by using this class we can place one element inside another element.

Syntax:

<element class="-space-x-0">...</element>

Example:

Output:

👁 Image
Comment
Article Tags: