dbushell / Responsive-Off-Canvas-Menu

A responsive off-canvas menu using CSS transforms and transitions. This repository contains several demos to support a Smashing Magazine article.
820 stars 217 forks source link

position: fixed and #inner-wrap margin #1

Closed anselm-urban closed 11 years ago

anselm-urban commented 11 years ago

I´m trying to implement the off-canvas menu into my existing website. My question is: why position: fixed doesn´t function?

cmegown commented 11 years ago

In my experience using fixed positioning in RWD isn't the best idea. While desktop and most tablets support it, a considerable chunk of phones made in the last 5 years do not. Some don't render the fixed positioning the way you intend or simply don't display the fixed content at all.

i-like-robots commented 11 years ago

Because the body is transformed using the translate function your fixed element now sits in a new context, rather than in the context of the window.

Further reading: http://meyerweb.com/eric/thoughts/2011/09/12/un-fixing-fixed-elements-with-css-transforms/