I know this isn't a very timely answer but there is a way to solve this. You could add a "spacer" element inside the element positioned absolute
ly with a negative bottom margin and a height that is the same size as the negative bottom margin.
HTML:
<div id="container">
<div class="spacer"></div>
</div>
CSS:
// same container code, but you should remove the margin-bottom as it has no effect
// spacer code, made it a class as you may need to use it often
.spacer {
height: 50px;
margin: 0 0 -50px 0;
/* margin: 20px 0 -50px 0; use this if you want #container to have a 'bottom padding', in this case of 20px */
background: transparent; /* you'll need this if #container's parent element has a different background from #container itself */
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…