I'm trying to update the toolbar on the website I'm creating and I'm struggling to create a toolbar that positions things where I want them. I want the name and logo for the site to be on the lefthand side of the toolbar while the login/sign-up buttons are fixed to the righthand side. So far, I've succeeded in getting the logo and title where I want it, but every time I try and add in buttons that are justified to the right margin, they simply position next to the end of the title/logo. Here is my code:
function Header() {
return (
<ThemeProvider theme={theme}>
<AppBar position="static">
<Toolbar>
<MenuItem edge="start">
<Link to="/" style={{textDecoration:"none", color:"black"}}>
<Typography variant="h3">
<strong>Test</strong>Value
<img style={{width: 60, height: 'auto', verticalAlign: 'middle'}} src='/png/SQUID.png' alt="Squiddy :)"/>
</Typography>
</Link>
</MenuItem>
<MenuItem>
<Link to={"/"} style={{ textDecoration: 'none' }}>
<Button type="button" variant="outlined" color="secondary" float="right">Log-in</Button>
</Link>
<Link to={"/"} style={{ textDecoration: 'none' }}>
<Button type="button" variant="contained" color="secondary" float="right">Register</Button>
</Link>
</MenuItem>
</Toolbar>
</AppBar>
</ThemeProvider>
);
}
I've tried using flexGrow as per the examples in the material-ui docs, I've considered using a grid element, but I don't actually want to worry about spacing between the title and the buttons, I simply want to be able to justify elements to both the left and right margins so that their position is consistent regardless of the size of screen they are viewed on, they remain in the same position relative to each margin.
Any help would be greatly appreciated.