Grow your CSS skills. Land your dream job.

Automatic right position fixed in FF?

  • # February 21, 2012 at 5:25 am

    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

    # February 21, 2012 at 5:39 am

    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 instead.

    # February 21, 2012 at 5:42 am

    Thank’s man, appreciate it :)

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".