CSS Float
Next ❯Vertical Align
- turned_in_notFloat Related Properties
- float
- clear
float
property specifies whether or not an element should floatclear
property is used to avoid the behavior of floating elementclear
property mainly used in elements after the element havingfloat
propertyclear
value defines at which value offloat
value, the current element will not be affected
I am only using clear property,The above image is using only float property,Get affected only when value of clear != float
img {
float:none;
height:90px;
}
p{
clear:none;
background-color:pink;
}
floatsubject
floatclose
<!DOCTYPE html>
<html>
<head>
<title>Full CSS Code</title>
<style>
img {
float:none;
height:90px;
}
p{
clear:none;
background-color:pink;
}
</style>
</head>
<body>
<img src="image.png" alt="leaf">
<p>I am only using <b>clear</b> property,
The above image is using only <b>float</b> property,
Get affected only when value of
<span style="color:red">clear != float</span>
</p>
</body>
</html>
- label_outlineTryout Others
Properties Values float:
clear:
clear:both
means left and right
❮ Prev CSS Overflow
Next ❯Vertical Align