selector {
position: static;
}
selector {
position: relative;
}
selector {
position: absolute;
}
Corral an absolute element inside any non-static element
.container {
position: relative;
}
.container .foo {
position: absolute;
bottom: 10px;
left: 10px;
height: 100px;
width: 100px;
}
Since relative- and absolute-positioned elements can overlap, use z-index to control the order of overlapping. The element with the highest z-index goes on top.
selector {
position: relative;
z-index: 2;
}
selector {
float: left;
float: right;
}
clear tells the element on which side (left, right, or both) floated elements cannot appear
selector {
clear: left;
clear: right;
clear: both;
}