22 lines
444 B
Markdown
22 lines
444 B
Markdown
|
---
|
||
|
title: Float Property
|
||
|
---
|
||
|
|
||
|
## Float Property
|
||
|
|
||
|
The `float` property allows an element to float to the left or right of another element. A primary use of `float` is to have an image on the left or right of a block of text.
|
||
|
|
||
|
```css
|
||
|
.my-element {
|
||
|
float: left;
|
||
|
float: right;
|
||
|
float: inline-start;
|
||
|
float: inline-end;
|
||
|
float: none;
|
||
|
}
|
||
|
```
|
||
|
|
||
|
#### More Information:
|
||
|
|
||
|
[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/CSS/float)
|