×

Tailwind CSS Grid Auto Rows

In tailwind CSS, this class takes multiple values and covers all of the properties in class form. It's a replacement for the grid-auto-rows CSS attribute. The size of the rows of implicitly produced grid containers is specified using this class. This class is used to manage the size of grid rows that are formed implicitly.

Grid Auto Rows classes

  • auto-rows-auto
  • auto-rows-min
  • auto-rows-max
  • auto-rows-fr

auto-rows-auto

It is the default setting. The size is implicitly determined by the container's dimensions.

Syntax
<element class="auto-rows-auto">..</element>

Example:

<!DOCTYPE html> 
<html> 
    <head> 
    <link href= 
"https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"
        rel="stylesheet"> 
</head> 
  
<body class="text-center"> 
    <h1 class="text-red-600 text-5xl font-bold"> 
        Tutorial and Example 
    </h1> 
  
    <b>Grid Auto Rows Class - Tailwind CSS </b> 
        <div class ="m-8 p-8 grid bg-red-600 grid-cols-2 
                     grid-flow-row gap-4 auto-rows-auto">
            <div class = "p-4 bg-red-200">
                Cascading Style Sheet
            </div> 
            <div class = "p-4 bg-red-200">
                HyperText Markup language
                  
            </div>  
            <div class = "p-4 bg-red-200">
                Bootstratp become replacement of CSS
            </div> 
            <div class = "p-4 bg-red-200">
                LiveScript Become JavaScript
            </div> 
  
        </div> 
    </body> 
</html> 

Output:

Tailwind CSS Grid Auto Rows

auto-rows-min

 It determines the size based on the container's smallest item.

Syntax
<element class="auto-rows-min">..</element>

Example:

<!DOCTYPE html> 
<html> 
    <head> 
    <link href= 
"https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"
        rel="stylesheet"> 
</head> 
 <body class="text-center"> 
    <h1 class="text-red-600 text-5xl font-bold"> 
        Tutorial and Example 
    </h1>         <b>Grid Auto Rows Class - Tailwind CSS </b>          <div class ="m-8 p-8 grid bg-red-600 grid-cols-2                       grid-flow-row gap-4 auto-rows-min">             <div class = "p-4 bg-red-200">                 HyperText Markup language             </div>              <div class = "p-4 bg-red-200">                 Bootstratp become replacement of CSS             </div>               <div class = "p-4 bg-red-200">                 LiveScript Become JavaScript             </div>              <div class = "p-4 bg-red-200">                 Cascading Style Sheet             </div>             </div>      </body>  </html> 

Output:

Tailwind CSS Grid Auto Rows

auto-rows-max

 It determines the size based on the container's largest item.

Syntax
<element class="auto-rows-max">..</element>

Example:

<!DOCTYPE html> 
<html> 
    <head> 
    <link href= 
"https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"
        rel="stylesheet"> 
</head> 
  
<body class="text-center"> 
    <h1 class="text-red-600 text-5xl font-bold"> 
        Tutorial and Example 
    </h1>         <b>Grid Auto Rows Class - Tailwind CSS </b>          <div class ="m-8 p-8 grid bg-red-600 grid-cols-2                       grid-flow-row gap-4 auto-rows-max">             <div class = "p-4 bg-red-200">                 LiveScript Become JavaScript             </div>              <div class = "p-4 bg-red-200">                 Cascading Style Sheet                                </div>               <div class = "p-4 bg-red-200">                 HyperText Markup language             </div>              <div class = "p-4 bg-red-200">                 Bootstratp become replacement of CSS             </div>             </div>      </body>  </html> 

Output:

Tailwind CSS Grid Auto Rows

auto-rows-fr

-It defines a size that is larger than or equal to min and less than or equal to the max in the range [min, max].

Syntax
<element class="auto-rows-fr">..</element>

Example:

<!DOCTYPE html> 
<html> 
    <head> 
    <link href= 
"https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"
        rel="stylesheet"> 
</head> 
  
<body class="text-center"> 
    <h1 class="text-red-600 text-5xl font-bold"> 
        Tutorial and Example 
    </h1>         <b>Grid Auto Rows Class - Tailwind CSS </b>          <div class ="m-8 p-8 grid bg-red-600 grid-cols-2                       grid-flow-row gap-4 auto-rows-fr">             <div class = "p-4 bg-red-200">                 LiveScript Become JavaScript             </div>              <div class = "p-4 bg-red-200">                 HyperText Markup language                                </div>               <div class = "p-4 bg-red-200">                 Bootstratp become replacement of CSS             </div>              <div class = "p-4 bg-red-200">                 Cascading Style Sheet             </div>             </div>      </body>  </html>

Output:

Tailwind CSS Grid Auto Rows

Related Topics

Tailwind CSS Width

The tailwind CSS width class accepts a large number of values, and all of the properties are covered in class form. It's a replacement for the CSS Width Property. This...

3 minutes read.

Tailwind CSS Grid Auto Rows

In tailwind CSS, this class takes multiple values and covers all of the properties in class form. It's a replacement for the grid-auto-rows CSS attribute. The size of the rows...

6 minutes read.

Tailwind CSS Justify Self

The class form goes over the various properties. It's a replacement for the CSS justify-self attribute. This class is used to describe the alignment of content’s position in a CSS...

4 minutes read.

Tailwind CSS Container

In Tailwind CSS, a compartment is utilized to fix the maximum width (max-width) of a component to match the min-width of the breakpoint. It comes exceptionally convenient when content must...

2 minutes read.

Tailwind CSS Opacity

This class accepts a lot of value, and all of the properties are covered in class form. We can change the opacity of any element by using this class. The...

1 minute read.

Tailwind CSS Stroke Width

In tailwind CSS, this class takes a large number of values and all of the properties are covered in the form. It is used to specify the width of an...

1 minute read.

Tailwind CSS Justify Items

It is a replacement for the CSS justify-items attribute. This class is used to regulate the alignment of grid objects along their inline axis. Justify Item It is classified as: justify-items-auto justify-items-start justify-items-end justify-items-center justify-items-stretch justify-items-auto The justify-items-auto class...

4 minutes read.

Tailwind CSS Object Position

It acknowledges more than one value in tailwind CSS. Every one of the properties is covered as in class form. It is the option in contrast to the CSS object-position...

2 minutes read.

Tailwind CSS Top / Right / Bottom / Left

In tailwind CSS, these classes take a variety of values and cover all of the characteristics in the class form. These are the CSS Top/Right/Bottom/Left properties' replacements. These classes are...

4 minutes read.

Tailwind CSS Margin

The margin class accepts a large number of values, and all of the properties are covered in the same way they are in the class form. It's a replacement for...

6 minutes read.

Tailwind CSS Grid Template Rows

In tailwind CSS, this class accepts multiple values and all properties are covered in class form. It's the CSS grid-template-row property's replacement. It is used to set the number of...

2 minutes read.

Tailwind CSS Box Shadow

The Tailwind CSS Box Shadow class accepts a lot of value, and all of the properties are covered in class form. We may control the box-shadow of an element by...

2 minutes read.

Tailwind CSS Visibility

In tailwind CSS, this class accepts two values. It's a replacement for the CSS visibility property. This class specifies whether an element in a web document is visible or not,...

2 minutes read.

Tailwind CSS Float

The float class acknowledges more than one worth (value) in tailwind CSS. It is an option in contrast to the CSS float property. The float class characterizes the progression of...

4 minutes read.

Tailwind CSS Fill

The CSS Fill class accepts a lot of value, and all of the properties are covered in class form. It is a presentation attribute that controls how an SVG shape's...

1 minute read.

Tailwind CSS Space Between

In tailwind CSS, this class accepts a large number of values, and all of the properties are covered in class form. It's a replacement for the CSS Space Between property....

4 minutes read.

Tailwind CSS Place Self

The tailwind CSS Place self class accepts a wide range of values. It's a replacement for the CSS Place Items property. This class is used to manage how a single...

4 minutes read.

Tailwind CSS Box Sizing

Tailwind CSS Box sizing class acknowledges more than one worth in tailwind CSS. Each property is shrouded as a class structure. It is an option in contrast to the CSS...

2 minutes read.

Tailwind CSS Installation

Here, we will discuss the installation method of Tailwind CSS using two strategies discussed as follows: Strategy 1: Install Tailwind through npm Step 1: npm init - y Step 2: npm install tailwindcss Step...

2 minutes read.

Tailwind CSS Padding

This class accepts a large number of values, and all of the properties are covered in class form. It's a replacement for the CSS Padding Property. This class is used...

4 minutes read.