I recently incorporated a Material UI library into my React project (material-ui.com) and I've been trying to center my logo within the appbar component.
Here is the code that I attempted:
<AppBar position="sticky" >
<Toolbar>
<img src={'../logo.svg'} className={classes.logo} alt="logo" />
</Toolbar>
</AppBar>
This is how I styled it:
logo: {
margin: 'auto',
textAlign: 'center',
maxWidth: '50%',
maxHeight: '70%',
}
It works "sort of". The logo size varies in Chrome and Firefox, while in Internet Explorer it overlaps with the appbar.
I'm seeking a solution to consistently center this logo in the middle of the bar across all browsers.