I want to build a page that looks like the window application. There is a problem with this that when I zoom-in the page it will display a scroll-bar on the main page. I set the parameters of the main page (the parent) as below. width: 100vw, height: 100vh
what should I do To scroll through the component inside the main page(the children components) instead of the main page(the parent component). I put my the css part of my code below.
first css code of the main page(parent). I use Material-ui for styling. root is the className of the main page. header,breadeCrumb and content are className of my children components.
const useStyles = makeStyles({
root: {
width:'100vw',
height: '100vh',
},
header: {
height: '10%',
},
breadCrumb: {
height: '10%',
},
content: {
height: '80%',
}
});
The content component also has its own children (sidebar and content) which I put their css properties below.
const useStyles = makeStyles({
root: {
border: '1px solid blue',
display: 'flex',
width:'auto',
height: 'auto',
},
sidebar: {
backgroundColor: 'orange',
width: '20%',
height: 'auto',
border: '1px solid red',
overflow: 'scroll'
},
content: {
height: 'auto',
width: '80%',
}
});
Is there something that I forgot to set? please guide me to solve this problem if you can.