I am trying to get a div (overlay) floating overtop of 3 other divs. It cuts a little bit into the 1st (horsebanner) and 3rd (footer) divs and entirely over the 2nd (midbackground). I want the 2nd div to increase automatically in size as the floating div increases so that the amount that the floating div cuts into the 3rd div always stays the same.
Here's the html:
<body> <div id="navigation"> </div> <div id="main"> <div class="overlay"> </div> <div class="horsebanner"> </div> <div class="midbackground"> </div> <div class="footer"> </div> </div> </body> Here the css:
#main { width: auto; height: 650px; background-color: #FF6; margin-top: 0; } #main .horsebanner { width: auto; height: 150px; background-color: #F90; margin-top: 0; } #main .midbackground { width: auto; height: 450px; background-color: #CCC; margin-top: 0; } #main .footer { width: auto; height: 50px; background-color: #333; margin-top: 0; } #main .overlay { width: 300px; height: 100px; margin-left:100px; margin-right:100px; background-color:#0F0; position: absolute; } I'm new to the html world and could use some advice. Again, trying to get the midbackground DIV to adjust bigger as the overlay DIV gets bigger.
.overlaydiv's height to be more than the middle div, and vertically eat into the space of the first and third divs?