Search code examples
cssz-index

Does position: fixed create a new stacking context for z-indicies?


The z-index spec makes no special mention of position: fixed, but this fiddle orders elements differently on Chrome 24. Does setting position: fixed create a new stacking context for child elements?


Solution

  • According to this post, Chrome 22+ mimics mobile WebKit's behavior and creates a new stacking context for fixed position elements.

    Firefox through at least 17 follows the spec and does not create a new context.