learnmore learnmore - 7 months ago
493 0

position:relative

If you specify position:relative, then you can use top or bottom, and left or right to move the element relative to where it would normally occur in the document.

position:absolute

When you specify position:absolute, the element is removed from the document and placed exactly where you tell it to go.

see examples and more at Learn More at ammanu
http://www.ammanu.edu.jo/Learn/Learn1.html

CSS

css position

#div-1 {
 position:static;
}

#div-2 {
 position:relative;
 top:20px;
 left:-40px;
}
            

#div-1a {
 position:absolute;
 right:0;
 width:100px;
}
            

#div-1c {
 position:fixed;
 bottom:0;
 width:200px;
}