The last element
position property we will discuss is the
fixed positioning is similar to
absolute positioning. The difference is that with
fixed positioning, the element does not scroll with the page. Let's take a look at an example.
To see the difference we will need to insert a large block of text in our html
<body>. This will force the page to allow scrolling.
Now let's preview our file, and see what happens to our
position when we attempt to scroll. We can see that the
<div> scrolls up and down with the page.
If we change our
<div> will no longer scroll with the page. It will stay in a
position at all times.