I have a structure like this:
#article {
position: relative;
height: 100%;
}
#special {
position: absolute;
bottom: 0%!important;
top: 100%!important;
width: 100%;
}
<section>
<div id="article">
<div>...</div>
<div id="special">...</div>
<div>...</div>
</div>
</section>
<section>
<div></div>
</section>
I place article div as position:relative
and special div as position:absolute
and top:100%
. It goes at the end of article div but it seems that it has no height at all and shows below the below section. I added height attribute to special div and height:100%
to article div with no success.
How can I force section div to occupy actual space? I tried to place an after element to special div to clear:both but no success.