Another position property is absolute positioning absolute positioning will ensure the element stays
in the exact same position specified in the style rule.
It does not consider the flow of the page when you resize the browser window.
Let's take a look at an example to illustrate this concept.
See we added a block of text above our div tags.
I'm just copying a block of text and I'm going to add it above the div tags here.
Now I'm going to save the file and we're going to preview this page in the web browser.
Take a look at what happens when we scale the browser when we resize it to bigger and smaller
you'll see that the div is moving up and down to accommodate the text as the browser shrinks and expands
with relative positioning.
The div moves with the flow of the page.
Now let's change the position of our parent div to absolute
keeping.
Remember that div 1 is our parent and we'll change the position to absolute.
Now when we save the page and refresh it
you'll see that the that the div remains in the exact same position as specified in our style declaration.
This is regardless of what we do.
So if we were to resize the browser No the parent div will stay in the exact same position we specified
notice that the nested div div 2 is still relative to its parent div.