How to make a moving element inside another block horizontally?

How to make a moving element inside another block, the type of position: sticky but only horizontally? Ie there is a parent block, which is located inside a child element, which is one of the best games from scrolling and cannot go beyond the parent unit, ie when you move it just sticks to the edges of the parent unit
March 23rd 20 at 19:08
2 answers
March 23rd 20 at 19:10
all good, but it is necessary that the adhesion of the block was only within the parent block, i.e., when we scrolling the page to the right is the element that is stuck on the left border of its parent and not scrolls on. - Kadin.Emard11 commented on March 23rd 20 at 19:13
@Kadin.Emard11, problem solved? - Creola.Carroll89 commented on March 23rd 20 at 19:16
March 23rd 20 at 19:12
Well and in what a problem most to use position: sticky?

Find more questions by tags HTMLJavaScriptCSS