15

The following example shows a div inside a div. The inner div is

position: fixed;

When I add

transform: translate(0px, 0px);

to the outer div, the inner div will no longer behave as fixed

Link to the example: http://dabblet.com/gist/1723937

So, does translate actually change the viewport? Can anyone help me to keep the inner div fixed using css, when the outer div has a translate style?

Thank you, Felix

James Donnelly
  • 126,410
  • 34
  • 208
  • 218
nyfelix
  • 301
  • 2
  • 5

1 Answers1

12

Here is an article on it:

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

Hope you find it helps.

Caleb Doucet
  • 1,751
  • 2
  • 14
  • 29
  • Thank you for this hint! At least it explains that this is the currently specified behavior :-) – nyfelix Feb 03 '12 at 09:41