treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Automatic right position fixed in FF?

  • I know this is "impossible" to keep an element in the same position it was before it became a fixed position, but in Chrome, this somehow works. I have this div that goes into fixed position when your scroll down to it, very popular tweak, however in Firefox and Opera, the div jumps to the right when I scroll. Any way to fix this? It does work in chrome.

    Demo:
    http://schart.net/profile.php?id=1
  • The problem is that your parent container #content-scroller is smaller then the child element inside it, you will need to ensure that the parent is the same with as the child otherwise using position: fixed will force the element into the <body> instead.
  • Thank's man, appreciate it :)