on-internet
← Community

Overlap DIV with another DIV

Stack Overflow ·

I have a DIV .text in a .main parent in my website. I would like to overlap some part of the header and "hide" a bottom part of it. In the example below, i would like the blue .text square to move 20px higher (up), overlapping partially the bottom of the yellow header. <div class="header" style="height: 200px;width: 100%;background: yellow;"></div> <div class="main" style="height: 800px;background: orange"> <div class="text" style="height: 100px;width: 50px;background: blue;"></div> </div>

Comments

Sign in or sign up to comment and upvote.

No comments yet.