I have a login page, with 2 textfields: username and password and login button, with the username field at the topmost, password field below it and the login button at the bottom. I want them to be at the center of the page always both vertically and horizontally. I tried this:
<Grid
className={classes.container}
container
spacing={16}
direction="column"
justify="center"
alignItems="center"
>
<Grid item xs={12}>
<TextField />
</Grid>
<Grid item xs={12}>
<TextField />
</Grid>
<Grid item xs={12}>
<Button />
</Grid>
</Grid>
It only centers horizontally. How can I make it center both horizontally and vertically?