×

Tailwind CSS Clear

This class acknowledges more than one worth in tailwind CSS. Every one of the properties is canvassed as in class form. It is an option in contrast to the CSS clear property. This class is utilized to indicate which side of floating elements are not permitted to float. It sets or returns the place of the element corresponding to floating items /objects. Fundamentally, it is utilized for controlling the wrapping of content around an element.

CSS Clear Classes

The classes are as follows:

  • clear-left
  • clear-right
  • clear-both
  • clear-none

clear-left

This class is utilized to determine that elements are not permitted to float on the left side corresponding to another element.

Syntax:

 <element class="clear-left">...</element>

Example

Code 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>clear Class - Tailwind CSS </b>

    <div class="mx-10">

    <img class="float-left p-2 w-20 h-20"

         src=

"Tutorialandexample logo_image.png">

    <img class="float-right p-2"

         src=

"Tutorialandexample logo_image.png ">

    <p class="text-justify clear-left">

        How often were you disappointed while watching out

        for a decent assortment of programming/calculation/interview

        questions? What did you expect and what did you get?

        This entry has been made to give elegantly composed,

        all-around thought and very much clarified answers for chosen

        questions. An IIT Roorkee former student and originator of

        Tutorialandexample.

  </p>

</center>

</body>

</html>

The output for the above code is:

Tailwind CSS Clear

clear-right

 This class is utilized to indicate that elements are not permitted to float on the right side corresponding to another element.

Syntax:

<element class="clear-right">...</element>

Example

Code 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>clear Class - Tailwind CSS </b>

    <div class="mx-10">

    <img class="float-left p-2 w-20 h-20"

         src=

" Tutorialandexample logo_image.png ">

    <img class="float-right p-2"

         src=

" Tutorialandexample logo_image.png ">

    <p class="text-justify clear-right">

        How often were you disappointed while watching out

        for a decent assortment of programming/calculation/interview

        questions? What did you expect and what did you get?

        This entry has been made to give elegantly composed,

        all-around thought and very much clarified answers for chosen

        questions. An IIT Roorkee former student and originator of

        Tutorialandexample.

  </p>

</center>

</body>

</html>

The output for the above code is:

Tailwind CSS Clear

clear-both

This class used to indicate that floating elements are not permitted to float on both sides.

Syntax:

 <element class="clear-both">...</element>

Example

Code 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>clear Class - Tailwind CSS </b>

    <div class="mx-10">

    <img class="float-left p-2 w-20 h-20"

         src=

" Tutorialandexample logo_image.png ">

    <img class="float-right p-2"

         src=

" Tutorialandexample logo_image.png ">

    <p class="text-justify clear-both">

        How often were you disappointed while watching out

        for a decent assortment of programming/calculation/interview

        questions? What did you expect and what did you get?

        This entry has been made to give elegantly composed,

        all-around thought and very much clarified answers for chosen

        questions. An IIT Roorkee former student and originator of

        Tutorialandexample.

  </p>

</center>

</body>

</html>

The output for the above code is:

Tailwind CSS Clear

clear-none

This class is utilized to indicate the default value. It permits elements to float on the sides.

Syntax:

<element class="clear-none">...</element>

Example

Code 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>clear Class - Tailwind CSS </b>

    <div class="mx-10">

    <img class="float-left p-2 w-20 h-20"

         src=

" Tutorialandexample logo_image.png ">

    <img class="float-right p-2"

         src=

" Tutorialandexample logo_image.png ">

    <p class="text-justify clear-none">

        How often were you disappointed while watching out

        for a decent assortment of programming/calculation/interview

        questions? What did you expect and what did you get?

        This entry has been made to give elegantly composed,

        all-around thought and very much clarified answers for chosen

        questions. An IIT Roorkee former student and originator of

        Tutorialandexample.

  </p>

</center>

</body>

</html>

The output for the above code is:

Tailwind CSS Clear

Related Topics

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

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