I have this simple React app and my footer does not take 100% width (I see small white space on the left and right sides). Can anyone tell me what I’m missing, please?
Here’s LIVE DEMO
Here’s my css:
.App {
min-height: 100vh;
display: flex;
flex-direction: column;
}
.footer {
margin-top: auto;
background-color: #000;
color: #fff;
height: 50px;
display: flex;
justify-content: center;
align-items: center;
font-size: 12px;
padding: 25px 0;
}
App.tsx
return (
<div className="App">
<Footer />
</div>
);
Images of my issue:
>Solution :
The body element has a default 8px margin, have you removed it? If not, you can simply add to you .css file the following code:
body {
margin: 0px;
}
Hope it helps you, if this is not your case feel free to comment here with more details.
Update: I tried adding it to your codesandbox and it worked here for me.

