Bootstrap 5 Clearfix – GeeksforGeeks
<!DOCTYPE html>
<
html
lang
=
"en"
>
<
head
>
<
meta
charset
=
"utf-8"
/>
<
meta
name
=
"viewport"
content
=
"width=device-width, initial-scale=1"
/>
<
link
href
=
rel
=
"stylesheet"
integrity
=
"sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65"
crossorigin
=
"anonymous"
/>
<
script
src
=
integrity
=
"sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4"
crossorigin
=
"anonymous"
>
</
script
>
</
head
>
<
body
>
<
div
class
=
"container"
>
<
h1
class
=
"text-success"
>
GeeksforGeeks
</
h1
>
<
h4
>
Bootstrap 5 Clearfix
</
h4
>
<
h5
class
=
"mt-3"
>
Without Clearfix
</
h5
>
<
div
class
=
"bg-danger w-25 p-1"
>
<
input
type
=
"text"
class
=
"float-start"
placeholder
=
"email"
>
<
button
type
=
"button"
class
=
"float-end btn btn-success"
>
Submit
</
button
>
</
div
>
<
h5
class
=
"mt-5"
>
With Clearfix
</
h5
>
<
div
class
=
"bg-danger clearfix w-25 p-1"
>
<
input
type
=
"text"
class
=
"float-start"
placeholder
=
"email"
>
<
button
type
=
"button"
class
=
"float-end btn btn-success"
>
Submit
</
button
>
</
div
>
</
div
>
</
body
>
</
html
>
<!DOCTYPE html>
<
html
lang
=
"en"
>
<
head
>
<
meta
charset
=
"utf-8"
/>
<
meta
name
=
"viewport"
content
=
"width=device-width, initial-scale=1"
/>
<
link
href
=
rel
=
"stylesheet"
integrity
=
"sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65"
crossorigin
=
"anonymous"
/>
<
script
src
=
integrity
=
"sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4"
crossorigin
=
"anonymous"
>
</
script
>
</
head
>
<
body
>
<
div
class
=
"container"
>
<
h1
class
=
"text-success"
>
GeeksforGeeks
</
h1
>
<
h4
>
Bootstrap 5 Clearfix
</
h4
>
<
h5
class
=
"mt-3"
>
Without Clearfix
</
h5
>
<
div
class
=
"bg-danger w-25 p-1"
>
<
input
type
=
"text"
class
=
"float-start"
placeholder
=
"email"
>
<
button
type
=
"button"
class
=
"float-end btn btn-success"
>
Submit
</
button
>
</
div
>
<
h5
class
=
"mt-5"
>
With Clearfix
</
h5
>
<
div
class
=
"bg-danger clearfix w-25 p-1"
>
<
input
type
=
"text"
class
=
"float-start"
placeholder
=
"email"
>
<
button
type
=
"button"
class
=
"float-end btn btn-success"
>
Submit
</
button
>
</
div
>
</
div
>
</
body
>
</
html
>