There is a block with position: absolute, you need to place a block under it so that it does not float on the previous one (it does not pop out). However, it should be within the container. Position: absolute has been set for the previous block in order to make the background the entire width of the screen, and not just within the container.

Closed due to the fact that the essence of the question is not clear to the participants 0xdb , Air , Vadizar , Arsen , kizoso Apr 11 '18 at 2:24 .

Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • 2
    Sample code in the studio. And it is not very clear who who than where. - Inquisitor

1 answer 1

As an option, put in a separate block

body { margin: 0; } .abs { width: 100vw; bottom: 0; position: absolute; } .abs .b1 { padding: 10px; background: #f1f1f1; border-top: 1px solid #ccc; box-shadow: 0 10px 50px rgba(0, 0, 0, 0.6); } .abs .b2 { padding: 10px; background: #222; } 
 <div class="abs"> <div class="b1"></div> <div class="b2"></div> </div>