×

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 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 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 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 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 Grid Column Start / End

This class accepts multiple values, and all of the properties are covered in class form. It was used as a replacement to the CSS grid-column property in CSS to express...

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

In tailwind CSS, this class accepts a wide range of values. It's a replacement for the CSS Align Items attribute. This class is used to align things within the flexible...

5 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 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 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 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 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 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 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 Justify Content

In tailwind CSS, this class accepts two values. It's a replacement for CSS's justify-content attribute. This class is used to describe the flexible box container's alignment. Along the main axis...

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