I used Material-UI 's AppBar component and it works well, but comes with a margin, anyone got a workaround. I need to get rid of the margin.
The AppBar component in Material UI is actually just a Paper component with some special CSS properties.
Use the theme. spacing() helper to create consistent spacing between the elements of your UI.
To add padding and margin to all React Material-UI components, we can use the Box component. We use Material UI's Box component to add a container with margin and padding. We set the margin on all sides with the m prop and we set the top padding with the pt prop.
If you use default React Web template to create the project, you can edit the index.html
file in public
folder, add below style in body:
<body style="margin: 0">
...
</body>
Or add it in you css file like below:
body {
margin: 0;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With