I want to apply margin bottom on an absolutely positioned element but it doesn't work.
Here's my code Html:
<div class="container">
<div class="absolute"></div>
<div class="item2"></div>
</div>
Css
.container {
position: relative;
}
.absolute {
position: absolute;
top: -20px;
margin-bottom: 20px;
}
I want to create a space between the first and the second item. I thought of using a margin-top on the second item, but the height of the first item changes cos of the content inside it