marcin
11/12/2017 - 8:52 PM

Css notes

Css notes

# Advanced-Positioning


position: relative;

# “Relative positioning” moves elements around relative to where they would normally appear in the static flow of the page. 
# This is useful for nudging boxes around when the default flow is just a little bit off.


position: absolute;

# “Absolute positioning” is just like relative positioning, 
# but the offset is relative to the entire browser window instead of the original position of the element. 


position: fixed;

# “Fixed positioning” has a lot in common with absolute positioning: it’s very manual, 
# the element is removed from the normal flow of the page, and the coordinate system 
# is relative to the entire browser window. The key difference is that fixed elements 
# don’t scroll with the rest of the page.