Relative positioning moves an element RELATIVE to its original position.
The style "left:-20px" subtracts 20 pixels from the element's original left position.
The style "left:20px" adds 20 pixels to the element's original left position.
With absolute positioning, an element can be placed anywhere on a page. The heading below is placed 100px from the left of the page and 150px from the top of the page.
The overflow property decides what to do if the content inside an element exceeds the given width and height properties.
This is an
image inside a paragraph.
This is an
image inside a paragraph.
Default z-index is 0. Z-index -1 has lower priority.
Move the mouse over the words to see the cursor change:
Auto