EDIT: From your comments below, what you are looking for is a static footer
#footer{
height: 50px;
display: block;
margin-top: 50px;
}
I'm such a SO noob I can't comment for more info :| . I assume you may be trying to achieve a fixed / sticky footer where the footer always appears at the bottom of the page? If you could provide an example of the effect you are trying to achieve I would be happy to edit my answer with more specific information.
Anyway because you are using absolute positioning the element is taken out of the document flow and it wont affect any other elements on the page. This means margins wont work. The same is true for fixed positioning, which is what you actually want if you are making a basic sticky footer.
If you want margin to have any effect on an element you need to set the elements display property to be a block level element (block, table, inline-block etc etc) and its positioning to either static (default) or relative.
The cleanest method for robust sticky footers is using flex box. Note the use of semantic html tags and classes instead of id's
<style>
/**
* 1. Avoid the IE 10-11 `min-height` bug.
* 2. Set `flex-shrink` to `0` to prevent Chrome, Opera, and Safari from
* letting these items shrink to smaller than their content's default
* minimum size.
*/
.site {
display: flex;
flex-direction: column;
height: 100vh; /* 1 */
}
.header,
.footer {
margin-top: 50px;
flex-shrink: 0; /* 2 */
}
.content {
flex: 1 0 auto; /* 2 */
}
</style>
<body class="site">
<header class="header">…</header>
<main class="content">…</main>
<footer class="footer">…</footer>
</body>
Courtesy of Phillip Walton http://philipwalton.com/articles/normalizing-cross-browser-flexbox-bugs/
Note that this only works for newer browsers so if you are supporting old versions of IE you will need to use a fixed positioning based sticky footer, or forget sticky footers all together.