×

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

CSS flexbox is an important component for frontend development. It is a front-end development alternative to the CSS flex-wrap Property. Note: You must include the flex class in your element before...

4 minutes read.

Tailwind CSS Grid Auto Columns

The Grid Auto Columns class accepts multiple values, and all of the properties are covered in class form. It's a replacement for the CSS grid-auto-columns property. The size of the...

5 minutes read.

Tailwind CSS Flex

CSS flexbox is an important component for frontend development. There are four flex options in Tailwind CSS, and all of the attributes are covered in class form. It's a front-end...

6 minutes read.

Tailwind CSS Stroke

This class accepts a lot of value, and all of the properties are covered in class form. It's the stroke class that goes on top of the SVG element. Stroke...

2 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 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 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 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 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 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 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.

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 Display

It acknowledges more than one worth in tailwind CSS. Every one of the properties is shrouded as in class structure. It is an option in contrast to the CSS display...

5 minutes read.

Tailwind CSS 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 height property. This class is used...

4 minutes read.

Tailwind CSS Min-Width

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-width property. This...

1 minute read.

Tailwind CSS Position

The position class acknowledges more than one value in tailwind CSS. It is an option in contrast to the CSS Position property. This class is utilized for controlling how an...

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