AppBar does not fill the top of the screen
See original GitHub issueProblem description
The AppBar has small padding on left, right and top. Please check the image included and the code. And also, I don’t have any other CSS imported.
Minimal working code that reproduces the issue
import React from 'react';
import ReactDOM from 'react-dom';
import registerServiceWorker from './registerServiceWorker';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import tapEventPlugin from 'react-tap-event-plugin';
import AppBar from 'material-ui/AppBar';
import App from './components';
import { blueA200, orange900 } from 'material-ui/styles/colors'
const MLAppBar = (props) => (
<AppBar
title="MUI Sandbox"
style={{backgroundColor: orange900 }}
>
</AppBar>
);
tapEventPlugin();
ReactDOM.render(<MuiThemeProvider><MLAppBar/></MuiThemeProvider>, document.getElementById('root'));
registerServiceWorker();
Versions
- Material-UI: 0.18.5
- React: 15.6.1
- Browser: Chrome Version 59.0.3071.115 (Official Build) (64-bit)
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
AppBar does not fill the top of the screen · Issue #7349 - GitHub
Problem description The AppBar has small padding on left, right and top. Please check the image included and the code.
Read more >How to make an AppBar Component fill all div's width and 10 ...
This problem is caused by the browser. Every browser has its own default user agent stylesheet, you can see it in your dev-tooling....
Read more >AppBar API - Material UI - MUI
API reference docs for the React AppBar component. Learn about the props, CSS, and other APIs of this exported module.
Read more >Top app bar – Material Design 3
Top app bars display information and actions at the top of a screen, such as the page headline and shortcuts to actions like...
Read more >Flutter TabBar: A complete tutorial with examples
TabBar enables you to improve the UX of your Flutter app by organizing content with tabs for users to tap and scroll through....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If it helps anyone else, I was having this issue and it’s because I just copied the little snippet from the docs for
AppBar
component, includingposition="static"
. I removed this (so defaultfixed
position was now used) and the little margin disappeared.So previously was:
And I just changed to
Try adding
margin:0px
tobody