×

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 is taken care of, which is excessively enormous for the container. It advises whether to clip content or to add scroll bars.

There is an independent property in CSS for CSS Overflow-x and CSS Overflow-y.

Overflow classes

The overflow classes are classified as:

  1. overflow-auto
  2. overflow-hidden
  3. overflow-visible
  4. overflow-scroll
  5. overflow-x-auto
  6. overflow-y-auto
  7. overflow-x-hidden
  8. overflow-y-hidden
  9. overflow-x-visible
  10. overflow-y-visible
  11. overflow-x-scroll
  12. overflow-y-scroll

overflow-auto

It consequently adds a scrollbar at whatever point it is required. This class adds scrollbars to an element on the occasion that its content overflows the limit (boundary) of that element.

Syntax:

<element class="overflow-auto">...</element>

Example:

An example for the overflow-auto class is as follows:

<!DOCTYPE html>

<head>
<link href=
"https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"
rel="stylesheet">
</head>

<body class="text-center">
<center>
<h1 class="text-red-600 text-5xl font-bold">
Tutorial and Example
</h1>

<b> Overflow Class - Tailwind CSS</b>

<div class="overflow-auto bg-red-200
p-4 mx-16 h-24 text-justify">
How frequently were you baffled while
paying special attention to a decent assortment of
programming/calculation/inquiries questions?
What did you expect and what did you get?
This entrance has been made to give
elegantly composed, very much idea and
well-clarified answers for chosen questions.
An IIT Roorkee former student and organizer of
Javatpoint. He loves to settle programming
Issues in most proficient ways. Aside from
Javatpoint, has worked with DE Shaw
, what's more, Co. as a product engineer and JIIT
Noida as an associate teacher. It is a
great stage to get the hang of programming. It is
an instructive site. Get ready for the
Enrolments drive of item-based organizations
like Microsoft, Amazon, Adobe, and so on with a
free web-based position arrangement course.
</div>
</center>
</body>
</html>

Output:

Tailwind CSS Overflow

overflow-hidden

The overflow is clipped and the remainder of the content is undetectable (invisible). This class is utilized to clip any content inside an element that overflows the limits (bounds) of that element.

Syntax:

<element class="overflow-hidden">...</element>

Example:

Example for overflow-hidden class is as follows:

<!DOCTYPE html>

<head>
<link href=
"https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"
rel="stylesheet">
</head>

<body class="text-center">
<center>
<h1 class="text-red-600 text-5xl font-bold">
Tutorial and Example
</h1>

<b> Overflow Class - Tailwind CSS</b>

<div class="overflow-hidden bg-red-200
p-4 mx-16 h-24 text-justify">
How frequently were you baffled while
paying special attention to a decent assortment of
programming/calculation/inquiries questions?
What did you expect and what did you get?
This entrance has been made to give
elegantly composed, very much idea and
well-clarified answers for chosen questions.
An IIT Roorkee former student and organizer of
Javatpoint. He loves to settle programming
Issues in most proficient ways. Aside from
Javatpoint, has worked with DE Shaw
, what's more, Co. as a product engineer and JIIT
Noida as an associate teacher. It is a
great stage to get the hang of programming. It is
an instructive site. Get ready for the
Enrolments drive of item-based organizations
like Microsoft, Amazon, Adobe, and so on with a
free web-based position arrangement course
.
</div>
</center>
</body>
</html>

Output:

Tailwind CSS Overflow

overflow-visible

The content isn't clipped and noticeable external the element box. This class is used to keep content inside an element from being clipped.

Syntax:

<element class="overflow-visible">...</element>

Example:

An example for the overflow-visible class is as follows:

<!DOCTYPE html>

<head>
<link href=
"https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"
rel="stylesheet">
</head>

<body class="text-center">
<center>
<h1 class="text-red-600 text-5xl font-bold">
Tutorial and Example
</h1>

<b> Overflow Class - Tailwind CSS</b>

<div class="overflow-visible bg-red-200
p-4 mx-16 h-24 text-justify">
How frequently were you baffled while
paying special attention to a decent assortment of
programming/calculation/inquiries questions?
What did you expect and what did you get?
This entrance has been made to give
elegantly composed, very much idea and
well-clarified answers for chosen questions.
An IIT Roorkee former student and organizer of
Javatpoint. He loves to settle programming
Issues in most proficient ways. Aside from
Javatpoint, has worked with DE Shaw
, what's more, Co. as a product engineer and JIIT
Noida as an associate teacher. It is a
great stage to get the hang of programming. It is
an instructive site. Get ready for the
Enrolments drive of item-based organizations
like Microsoft, Amazon, Adobe, and so on with a
free web-based position arrangement course
.
</div>
</center>
</body>

</html>

Output:

Tailwind CSS Overflow

overflow-scroll

The overflow is clipped however a scrollbar is added to see the remainder of the content. The scrollbar can be horizontal or vertical. This class is utilized when you want to show scrollbars, this utility might be shown assuming that scrolling over is vital.

Syntax:

<element class="overflow-scroll">...</element>

Example:

Example for overflow-scroll class is as follows:

<!DOCTYPE html>

<head>
<link href=
"https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"
rel="stylesheet">
</head>

<body class="text-center">
<center>
<h1 class="text-red-600 text-5xl font-bold">
Tutorial and Example
</h1>

<b> Overflow Class - Tailwind CSS</b>

<div class="overflow-scroll bg-red-200
p-4 mx-16 h-24 text-justify">
How frequently were you baffled while
paying special attention to a decent
assortment of programming/
calculation/inquiries questions?
What did you expect and what did you get?
</div>
</center>
</body>

</html>

Output:

Tailwind CSS Overflow

overflow-x

This class determines whether to add a scrollbar, clip the content, or show overflow content of a block-level element when it overflows at the left and right edges.

overflow-x-auto

It gives a scrolling over a component to overflowing boxes.

Syntax:

<element class="overflow-x-auto">...</element>

Example:

An example for the overflow-auto class is as follows:

<!DOCTYPE html>

<head>
<link href=
"https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"
rel="stylesheet">
</head>

<body class="text-center">
<center>
<h1 class="text-red-600 text-5xl font-bold">
Tutorial and Example
</h1>

<b> Overflow-x Class - Tailwind CSS</b>

<div class="overflow-x-auto bg-red-200
p-4 mx-16 h-24 text-justify">
How frequently were you baffled while
paying special attention to a decent
assortment of programming/
calculation/inquiries questions?
What did you expect and what did you get?
</div>
</center>
</body>

</html>

Output:

Tailwind CSS Overflow

overflow-x-hidden

It is utilized to clip the content and no scrolling over a system is given on the x-axis.

Syntax:

<element class="overflow-x-hidden">...</element>

Example:

Example for overflow-x-hidden class is as follows:

<!DOCTYPE html>

<head>
<link href=
"https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"
rel="stylesheet">
</head>

<body class="text-center">
<center>
<h1 class="text-red-600 text-5xl font-bold">
Tutorial and Example
</h1>

<b>Overflow-x Class - Tailwind CSS </b>

<div class="overflow-x-hidden bg-red-200
p-4 mx-16 h-12 text-justify">
How frequently were you baffled while
paying special attention to a decent
assortment of programming/
calculation/inquiries questions?
What did you expect and what did you get?

</div>
</center>
</body>

</html>

Output:

Tailwind CSS Overflow

overflow-x-visible

This class doesn't clip the content. The content might be delivered externally on the left and right edges.

Syntax:

<element class="overflow-x-visible">...</element>

Example:

Example for overflow-x-visible class is as follows:

<!DOCTYPE html>

<head>
<link href=
"https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"
rel="stylesheet">
</head>

<body class="text-center">
<center>
<h1 class="text-red-600 text-5xl font-bold">
Tutorial and Example
</h1>

<b>Overflow-x Class - Tailwind CSS </b>

<div class="overflow-x-visible bg-red-200
p-4 mx-16 h-24 text-justify">
How frequently were you baffled while
paying special attention to a decent
assortment of programming/
calculation/inquiries questions?
What did you expect and what did you get?

</div>
</center>
</body>

</html>

Output:

Tailwind CSS Overflow

overflow-x-scroll

It is utilized to clip the content and give a scrolling over system (a mechanism).

Syntax:

<element class="overflow-x-scroll">...</element>

Example:

Example for overflow-x-scroll class is as follows:

<!DOCTYPE html>

<head>
<link href=
"https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"
rel="stylesheet">
</head>

<body class="text-center">
<center>
<h1 class="text-red-600 text-5xl font-bold">
Tutorial and Example
</h1>

<b>Overflow-x Class - Tailwind CSS </b>

<div class="overflow-x-scroll bg-red-200
p-4 mx-16 h-24 text-justify">
How frequently were you baffled while
paying special attention to a decent
assortment of programming/
calculation/inquiries questions?
What did you expect and what did you get?

</div>
</center>
</body>

</html>

Output:

Tailwind CSS Overflow

overflow-y

This class indicates whether to add a scrollbar, clip the content, or show overflow content of a block-level element when it overflows at the top and base (bottom) edges.

overflow-y-auto: It gives a scrolling over the system to overflowing boxes.

Syntax:

<element class="overflow-y-auto">...</element>

Example:

Example for overflow-y-auto class is as follows:

<!DOCTYPE html>

<head>
<link href=
"https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"
rel="stylesheet">
</head>

<body class="text-center">
<center>
<h1 class="text-red-600 text-5xl font-bold">
Tutorial and Example
</h1>

<b>Overflow-y Class - Tailwind CSS </b>

<div class="overflow-y-auto bg-red-200
p-4 mx-16 h-24 text-justify">
How frequently were you baffled while
paying special attention to a decent
assortment of programming/
calculation/inquiries questions?
What did you expect and what did you get?

</div>
</center>
</body>

</html>

Output:

Tailwind CSS Overflow

overflow-y-hidden

It is utilized to clip the content and no scrolling over the system is given on the y-axis.

Syntax:

<element class="overflow-y-hidden">...</element>

Example:

Example for overflow-y-hidden class is as follows:

<!DOCTYPE html>

<head>
<link href=
"https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"
rel="stylesheet">
</head>

<body class="text-center">
<center>
<h1 class="text-red-600 text-5xl font-bold">
Tutorial and Example
</h1>

<b>Overflow-y Class - Tailwind CSS </b>

<div class="overflow-y-hidden bg-red-200
p-4 mx-16 h-24 text-justify">
How frequently were you baffled while
paying special attention to a decent
assortment of programming/
calculation/inquiries questions?
What did you expect and what did you get?

</div>
</center>
</body>

</html>

Output:

Tailwind CSS Overflow

overflow-y-visible

This class doesn't clip the content. The content might be delivered externally on the left and right edges.

Syntax:

<element class="overflow-y-visible">...</element>

Example:

Example for overflow-y-visible class is as follows:

<!DOCTYPE html>

<head>
<link href=
"https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"
rel="stylesheet">
</head>

<body class="text-center">
<center>
<h1 class="text-red-600 text-5xl font-bold">
Tutorial and Example
</h1>

<b>Overflow-y Class - Tailwind CSS </b>

<div class="overflow-y-visible bg-red-200
p-4 mx-16 h-24 text-justify">
How frequently were you baffled while
paying special attention to a decent
assortment of programming/
calculation/inquiries questions?
What did you expect and what did you get?

</div>
</center>
</body>

</html>

Output:

Tailwind CSS Overflow

overflow-y-scroll

It is utilized to clip the content and gives a scrolling mechanism.

Syntax:

<element class="overflow-y-scroll">...</element>

Example:

Example for overflow-y-scroll class is as follows:

<!DOCTYPE html>

<head>
<link href=
"https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"
rel="stylesheet">
</head>

<body class="text-center">
<center>
<h1 class="text-red-600 text-5xl font-bold">
Tutorial and Example
</h1>

<b>Overflow-y Class - Tailwind CSS </b>

<div class="overflow-y-scroll bg-red-200
p-4 mx-16 h-24 text-justify">
How frequently were you baffled while
paying special attention to a decent
assortment of programming/
calculation/inquiries questions?
What did you expect and what did you get?

</div>
</center>
</body>

</html>

Output:

Tailwind CSS Overflow

Related Topics

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 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 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 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 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 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 tutorial

Tailwind CSS can be utilized to make sites in the quickest and the least demanding way. Tailwind CSS is the most famous utility-first CSS structure on the planet for quickly...

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

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 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 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 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 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 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 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 Place Items

This class accepts a wide range of values. It's a replacement for the CSS Place Items property. This class is used to manage how things are justified while still being...

4 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 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 Place Content

This class accepts a wide range of values. It's a replacement for the CSS Place Content property. This class is used to manage how information is justified while still being...

5 minutes read.