Hello,
I have a site with a fixed menu at the top which I put the class header, and it accompanies the scroll bar, I know that my other div with the content class needs a margin according to the height of the header to not stay capped. My question is how I do it flexibly. That regardless of the height of the header the margin of the div contain is changed without needing to change the margin all the time.
html {
background-color: #bcbcbc;
}
.header {
background-color: white;
height: 100px;
top: 0;
left: 0;
width: 100%;
position: fixed;
}
.header h2{
text-align: center;
}
.content{
height: 100%;
}
.footer {
background-color: black;
height: 100px;
width: 100%;
}
<div class="header">
<h2>FIXED</h2>
</div>
<div class="content">
<h1>Conteudo</h1>
<h1>Conteudo</h1>
<h1>Conteudo</h1>
<h1>Conteudo</h1>
<h1>Conteudo</h1>
<h1>Conteudo</h1>
</div>
<div class="footer">
</div>