After removing the border of the footer
tag, the margin-top
property of the <div id="foot">
is applied to the footer tag instead.
Below is the code being used:
footer {
background: #0096D6;
width: 100%;
height: 250px;
color: #fff;
border: #FF0004 1px solid;
}
#foot {
width: 1136px;
margin: 0 auto;
margin-top: 80px;
}
<footer>
<div id="foot">
<div id="subscribe">
<b>Subscribe</b><br><br>Get the latest news, events, updates and offers from the team and people working in DigitNomics.<br><br><input type="email" name="email" id="email" placeholder="<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="90e9ffe5e2fef1fdf5d0f4fffdf1f9febef3fffd">[email protected]</a>" />
</div>
<span id="development">
<ul>
Current Development
<a href="#"><li>Demo</li></a>
<a href="#"><li>ALPHA Development</li></a>
<a href="#"><li>BETA Development</li></a>
</ul>
</span>
</div>
</footer>
View the fiddle with border here: https://jsfiddle.net/dkp5k1yq/
When the border is present, the margin-top works as expected.
And this is the second fiddle without the border on the footer
: https://jsfiddle.net/dkp5k1yq/1/
I prefer not to have a border on the footer tag, but when removed, its child's margin property gets transferred to it.