If possible, how can I use CSS only to vertically center a div between fixed margin at the top and bottom? The margin is to accommodate a header and a footer.
<div id="header" style="position: fixed; height: 200px; background-color: orange;"></div>
<div class="viewport" style="overflow: hidden">
<div class="page">
<div class="content">Vertically Aligned Section 1</div>
</div>
<div class="page">
<div class="content">Vertically Aligned Section 2</div>
</div>
</div>
<div id="footer" style="position: fixed; height: 50px; bottom: 0px; background-color: gray;"></div>
The idea of this HTML is that there is a fixed header and footer and the content should be centered between these 2 divs. Additionally, the javascript allows the just to "jump" to different pages. The content within these page should be centered between the header and footer.