I have a div along the left side of my webpage that expands to varying heights depending on its contents. Sometimes its inner contents causes the div to expand to the bottom of the page. However, I want there to be a margin at the bottom, so it doesn't actually go to the bottom of the page. How can I add the necessary margin? I tried adding margin-bottom:50px
to .wrap
, but it didn't work.
HTML:
<div class="wrap">Contents</div>
CSS:
.wrap {
position:absolute;
top:40px;
min-width:220px;
left:0;
}