×

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 Flex Grow

CSS flexbox is an important element for frontend development; there are two flex-grow options in Tailwind CSS, and all attributes are covered in class form. It is an alternative to...

3 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 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 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 Gap

In tailwind CSS, this class accepts multiple values, and all of the properties are covered in class form. It's a replacement for the CSS gap attribute. This class is used...

4 minutes read.

Tailwind CSS Order

One of the best features of Tailwind CSS is the Order class, which allows us to order flex and grid objects according to our needs. There are several different order...

2 minutes read.

Tailwind CSS Align Content

In Tailwind CSS, this class accepts a wide range of values. It's a replacement for the CSS Align Content feature. This class is used to modify the flex-wrap property's behavior....

5 minutes read.

Tailwind CSS Flex Direction

CSS flexbox is an important element for frontend development. CSS has four directions, therefore in tailwind CSS, all of the properties are covered in class form. It's a front-end development...

5 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 Overflow

The overflow class acknowledges more than one value in Tailwind CSS. It is an option in contrast to the CSS Overflow property. This overflow is for controlling how element content...

9 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 Max-Height

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 Max-Height attribute. It is used to...

3 minutes read.

Tailwind CSS Flex Shrink

CSS flexbox is an important element for frontend development. There are two flex-shrink options in Tailwind CSS, and all properties are covered in class form. For quick front-end development, it's...

3 minutes read.

Tailwind CSS Grid Row Start / End

In tailwind CSS, this class takes several values. All of the attributes are covered in the form of a class. In CSS, it's an alternative to the grid-row attribute. It's...

4 minutes read.

Tailwind CSS Min-Height

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 Min-Height Property. It...

2 minutes 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 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 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 Object Fit

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

4 minutes read.

Tailwind CSS Align Self

This class accepts a wide range of values. It's a replacement for the CSS Align Self attribute. This class is used to control how a flex or grid item is...

4 minutes read.