Is it possible to somehow trim off the width of the element not from start?

I have a long element with position: fixed width of 2000 pixels. Under the Board, also with a width of 2000 pixels, the table has horizontal scrolling. The element is located above the table.

If the start element is at the left corner of the table, to trim the item by the width of the table is not difficult, the element width will be the width of the visible table, for example its width will be 1200 pixels from the beginning of the element. However I want the element "scrollers" along with a table - for example, when the horizontal scroll shift to the right by 150 pixels, the width of an element should be all of the same 1200 pixels, but not with the starting position of the element, and 150 pixels to the left, i.e. formally, it is a segment (150, 1350) from the element.

Is it possible to implement? How to trim the item from the beginning?
March 23rd 20 at 18:55
1 answer
March 23rd 20 at 18:57
I agree, code would be better.
To do this, of course, possible, for example, via JS. When best personal Finance calculates how much you need to shift and assigned styles, like
position: relative;
right: 112px;

Maybe easier, but again, this requires code.

Find more questions by tags CSS