My AppBar is working fine without using sticky, but I need the element on my page to stick at the top when the user scrolls. I found a solution that seems to work here: https://www.w3schools.com/howto/howto_css_sticky_element.asp
However, in my React page, I want my ProgressBar component to remain at the top. The RenderTeamSelections component, which is a large table below it, quickly pushes the ProgressBar out of view. I want the ProgressBar to stay visible while the user interacts with the table. Here is the relevant code:
return (
<div className={rootClassName}>
<div className="g-row">
<div className="g-col">
<AccountProfile {...this.props} />
<br />
<Team team={this.props.team} profileDetail={profileDetail} />
<br />
<ProgressBar {...this.props} />
<br />
<RenderTeamSelections {...this.props] />
</div>
</div>
</div>
);
I have tried using withStyles and experimenting with 'fixed', 'sticky', and '-webkit-sticky' for the position of the ProgressBar, but it has not stayed at the top when scrolling. Any assistance would be greatly appreciated as I could not find any direct solutions in the Material docs for this scenario.