default is in-flow¶
most of the elements we have seen so far are said to be in-flow :
i.e. they show up in the order where they appear in the source
at a position determined by the elements before them
out-of-flow is available too¶
there are ways to create elements out-of-flow
a common practical example is a pinned header (or navigation bar), illustrated below
position: sticky : a pinned header¶
Loading...
see also¶
this being said if you want to dig deeper into this topic :
this topic is described at greater length in this MDN article
css-tricks also has a blog post dedicated to floats
z-index¶
when using out-of-flow elements, you may want to control what appears on top of what
see property z-index to define what is on the front or in the back