on-internet
← Community

Set position absolute and margin

Stack Overflow ·

I would like to set an element's position to absolute and have a margin-bottom, but it seems that the margin-bottom doesn't have an effect. HTML: <div id='container'></div> CSS: #container { border: 1px solid red; position: absolute; top: 0px; right: 0px; width: 300px; margin-bottom: 50px; // this line isn't working }

Comments

Sign in or sign up to comment and upvote.

No comments yet.