I can't figure out why the margin-top of the <nav> element ( which comes after the <hgroup> element ) affects the margin-top or the placement of the <hgroup> . By adding a top margin to the <nav> element, the <hgroup> element also moves down as if it also has a top-margin applied to it
heading {
position: relative;
display: inline-block;
border: 1px solid #333;
}
heading hgroup {
display: inline-block;
font-family: "Avenir";
font-size: 5em;
border: 1px solid yellow;
}
nav {
position: relative;
display: inline-block;
margin: 500px 0 0 -1.618em;
border: 1px solid red;
}
<heading>
<hgroup>
<h1>NERD</h1>
<h1>CO.</h1>
</hgroup>
<nav>
<ul>
<li><a href="#">articles</a></li>
<li><a href="#">podcast</a></li>
<li><a href="#">social</a></li>
<li><a href="#">about</a></li>
<li><a href="#">contact</a></li>
</ul>
</nav>
</heading>