I'm just wondering why I can't set background for whole my div with a subDiv that has a margin just like that
HTML
import "./styles.css";
export default function App() {
return (
<div className="App">
<div className="contain">
</div>
</div>
);
}
CSS
.App {
position: relative;
width: 100%;
min-height: 100vh;
background: rgb(247, 159, 159);
}
.App .contain {
position: relative;
margin: 80px 0;
}
It just colors that subDiv and the top and bottom space is still white: