* { padding: 0; margin: 0; } #header { height: 100vh; width: 100%; display: block; background: #ddd; background-repeat: no-repeat; background-size: 100%; background-attachment: fixed; } .mw { max-width: 1170px; height: 100vh; margin: 0 auto; } #header_nav { width: 1190px; margin-top: 35px; background: #fff; height: 90px; display: block; } <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Umbrella</title> <link rel="stylesheet" href="css/main.css" type="text/css"> </head> <body> <div id="header"> <div class="mw"> <div id="header_nav"> </div> </div> </div> </body> </html> How to make it so that the white block would stick inside the yellow one? There is an idea with the use of float: left , but it seems to me wrong.
