display processing in middle of current scroll position

display processing in middle of current scroll position

mgimgi Posts: 14Questions: 6Answers: 1

Hi,

I am struggling with displaying processing indicator, when I have scroll X enabled . I want it to be in a middle of current scroll position.

With position: absolute; it stays at the beginning of the table, with position: fixed; it is moving with scroll bar, but when you resize table it is not in the middle of table anymore.

Here is jsFiddle: http://jsfiddle.net/vdjfq14n/

Thanks for help

Answers

  • colincolin Posts: 15,118Questions: 1Answers: 2,583

    Hi @mgi ,

    It's because you've got position: fixed in the CSS - if you remove that, if can be placed correctly.

    Cheers,

    Colin

  • mgimgi Posts: 14Questions: 6Answers: 1

    Hi @colin ,

    when i remove position: fixed , processing indicator is in the middle, but when you scroll to the right it stays at the beginning of the table, i want it to move with the scroll bar.

  • allanallan Posts: 61,449Questions: 1Answers: 10,055 Site admin

    I'm not sure there is a way to do that in CSS at the moment. position:fixed makes it relative to the document window. position:absolute will make it relative to the offset parent, but that won't move with the scroll.

    I think you'd have to update its position on the scroll event with Javascript if you don't want position:fixed.

    Allan

This discussion has been closed.