In this codesandbox example, I have successfully set the grid container height to full using 100vh
. However, there is an issue with a margin of 8px
being added by the user agent to the body element, and I'm struggling to find a solution to remove it.
<Box sx={{ flexGrow: 1 }}>
<Grid container spacing={2} sx={{ height: "100vh" }}>
<Grid item xs={4} sx={{ backgroundColor: "red" }} />
<Grid item xs={8} sx={{ backgroundColor: "blue" }} />
</Grid>
</Box>
Does anyone have any suggestions or solutions for this issue?