CSS Float

In CSS, the float property is used to position an element to the left or right of its container, allowing other inline elements (such as text) to wrap around it. This property was more commonly used in older layouts but has since been largely replaced by newer layout techniques like Flexbox and Grid.


Syntax:

float: left | right | none | inherit;
Example
.img1 {
float: right;
}
.img2 {
float: left;
}

Try it yourself


Whereisstuff is simple learing platform for beginer to advance level to improve there skills in technologies.we will provide all material free of cost.you can write a code in runkit workspace and we provide some extrac features also, you agree to have read and accepted our terms of use, cookie and privacy policy.
© Copyright 2024 www.whereisstuff.com. All rights reserved. Developed by whereisstuff Tech.