, 10 tweets, 2 min read Read on Twitter
CSS2.1: Absolute positioning.
'position: absolute'
means that the element goes where top/left/bottom/right properties tell it to go.

This is relative to its "containing block" which is the next ancestor whose positioning is 'absolute' or 'relative' (or others?)
'position: fixed' is a kind of absolute positioning, but its containing block is the viewport.
They don't move with scroll.
(if you're formatting for pages, they appear on every page.)
Now to continue this from the blues bar

#CSSblues
With ‘position: absolute’ if you say ‘top: auto’ then it means “the height it would have in normal flow, don’t change that”

I would have expected it to be like ‘top: 0px’ but nope, it means “it matters where I put this element among the other contents”
Z-index: specify what is on top of what.

You can set the z-index property to:
A negative integer: be behind normal stuff
Positive: be in front of normal stuff

(In order of course)
Where “normal stuff” is roughly, from back to front:
- blocks
- floats
- inline stuff

Oh but whatever “forms the stacking context” by declaring a z-index other than “auto” - its backgrounds and borders go first (farthest back).
Oh hey I forgot the good part of absolute positioning: ‘float’ is ignored.

Both float and absolute/fixed position change the display value, too. A bunch of inline and within-table values just become “Block”. Because a floating or absolute “table-footer-group” doesn’t make sense
The visual formatting model (ch 9) ends with a description of the ‘direction’ and ‘Unicode-bidi’ properties.

Don’t mess with these if you’re styling HTML. People from the Unicode and HTML standards have worked hard to get them right. CSS collaborates.
Next up, chapter 10, Visual Formatting Model... Details
In which we finally get to the detail of calculating width and height!!
Missing some Tweet in this thread?
You can try to force a refresh.

Like this thread? Get email updates or save it to PDF!

Subscribe to Jessica Kerr
Profile picture

Get real-time email alerts when new unrolls are available from this author!

This content may be removed anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!