This is a box with static positioning. It's tall enough to fit its contents.
This is another box with static positioning. It's tall enough to fit its contents.
This is a third and final box with static positioning. It's tall enough to fit its contents.
This box has relative positioning. It can be moved with top, bottom, right, and left declarations without disturbing the other elements. This is the basis of coding a pop up window.
Pro tip: When using these properties, make the value negative. That way, it behaves like coordinate points a cartesian plane.
P.S: This box isn't centered. It's just moved relative to its original position.
This box is has a property of absolute. It has the same top, right, bottom, and left values as it's parent unless coded otherwise. If this text is visible despite the tiny size of the container, you need to add `overflow: hidden` declaration.
Jk, this is the actual final box with static positioning.
It is to prove that the relative box, while it breaks out of the flow, is still acknowledged. Look at the chunk of space between this and the 3rd box! This isn't helpful when making a popup. We don't want this chunk of space, the remnants of the popup box, to influence the look of our page.
This is where absolute positioning truly shines.
This is a box with static positioning. Unlike the previous box, it doesn't acnowledge the pop up box that's coded right before it.
This is a box with static positioning. Unlike the previous box, it doesn't acnowledge the pop up box that's coded right before it.
Now there are two!
A box is stuck at the bottom of the screen!