×

Tailwind CSS Float

The float class acknowledges more than one worth (value) in tailwind CSS. It is an option in contrast to the CSS float property. The float class characterizes the progression of content for controlling the wrapping of content around an element.

Float Classes

There are three types of float classes, which are as follows:

  • float-right
  • float-left
  • float-none
  1. float-right

This class is utilized to make the element float on the right half (right-side) of the container.

Syntax:

<element class="float-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>float Class - Tailwind CSS </b> 
<div class="mx-10">
<img class="float-right p-2" 
src=
“javatpoint logo_image.png">
<p class="text-justify ">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 chose
questions. An IIT Roorkee former student and originator of
Javatpoint. He loves to take care of programming issues
in most productive ways. Aside from Javatpoint, he
has worked with DE Shaw and Co. as a product designer
what's more JIIT Noida as an associate professor.It is a decent
stage to pick up programming. It is an instructive
site. Get ready for the Recruitment drive of item
based organizations like Microsoft, Amazon, Adobe and so on with
a free internet based arrangement readiness course. </p>
</center>
</body> 
</html>

The output for the above code is:

Tailwind CSS Float

In the above output, the image which is circled is following the float right command.

  1. float-left

This class is utilized to make the element float on the left half (side) of the container.

Syntax:

<element class="float-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>float Class - Tailwind CSS </b> 
<div class="mx-10">
<img class="float-left p-2" 
src=
"javatpoint logo_image.png">
<p class="text-justify ">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 chose
questions. An IIT Roorkee former student and originator of
Javatpoint. He loves to take care of programming issues
in most productive ways. Aside from Javatpoint, he
has worked with DE Shaw and Co. as a product designer
what's more JIIT Noida as an associate professor.It is a decent
stage to pick up programming. It is an instructive
site. Get ready for the Recruitment drive of item
based organizations like Microsoft, Amazon, Adobe and so on with
a free internet based arrangement readiness course.</p>
</center>
</body> 
</html>

The output for the above code is:

Tailwind CSS Float

In the above output, the image which is (at left corner) circled is following the float left command.

  1. float-none

This class is utilized to make the element float at the default place. We are utilizing the center tag so the picture is put in the middle (center).

Syntax:

<element class="float-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>float Class - Tailwind CSS </b> 
<div class="mx-10">
<img class="float-none p-2" 
src=
"javatpoint logo_image.png">
<p class="text-justify ">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 chose
questions. An IIT Roorkee former student and originator of
Javatpoint. He loves to take care of programming issues
in most productive ways. Aside from Javatpoint, he
has worked with DE Shaw and Co. as a product designer
what's more JIIT Noida as an associate professor.It is a decent
stage to pick up programming. It is an instructive
site. Get ready for the Recruitment drive of item
based organizations like Microsoft, Amazon, Adobe and so on with
a free internet based arrangement readiness course.</p>
</center>
</body> 
</html>

The output for the above code is:

Tailwind CSS Float

In the above output, the image which is circled (at left corner) is following the float none command.


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 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 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 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 Box Sizing

Tailwind CSS Box sizing class acknowledges more than one worth in tailwind CSS. Each property is shrouded as a class structure. It is an option in contrast to the CSS...

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 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 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 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 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 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 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 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 Grid Auto Flow

In tailwind CSS, this class accepts multiple values, and all of the properties are covered in class form. It is a CSS alternative. The grid-auto-flow property is used in Tailwind...

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

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