I am currently using React and Material UI React to develop my application. My goal is to implement the AppBar
component with content underneath, without causing the entire page to scroll. I want the content to occupy the maximum remaining height and the full width of the page.
Layout.tsx:
<AppBar position="static" component="header">
<Toolbar>
<Logo className={classes.logo} />
<div className={classes.grow} />
<IconButton className={classes.avatar} edge="end">
<Avatar />
</IconButton>
</Toolbar>
</AppBar>
<Container className={classes.content} component="main">
{props.children}
</Container>
I have experimented with different combinations of the available position
values for the AppBar
, including "static"
, "fixed"
, "absolute"
, "sticky"
, "relative"
, or leaving it undefined. Additionally, I have tried adjusting the heights and widths of the content, but so far, no combination has produced the desired outcome.