5.1: Static
Static positioning is an element's default position
It will remain on the page according to normal flow of page.
It WILL NOT be affected by other positional properties and values.
Copy and paste
Add a margin of 100px Add a top value of 100px
What happens? In which case does it move and in which does it not?
This is all well and good but doesn't demonstrate static positioning very well as it relates to other items, so add the following code adding a document and then duplicate the html and place it below the last </div>. You should have to <div> blocks.
Notice how the square is in the same position according to the document.
Explore More
Play around with the margin property on both the wrapper and the square.
Toggle this property on & off and notice how the static green square reacts.
Last updated