Forgive me for the rookie question, I know what I want to achieve should be simple but I seem to be having trouble articulating it in my search for solutions.
Essentially, I am trying to set a section in HTML to the height of the viewport minus the height of the navigation bar and a small slider at the bottom.
Do I need JavaScript to accomplish this? Any assistance would be greatly appreciated.
I've tried using the following CSS:
.container {
height: 100%;
margin-top: -300px;
min-width: 100%;
}
.slider-wrapper {
height: 300px;
min-width: 100%;
}
However, this doesn't have the desired effect as it cuts off the top of the container. Is there some jQuery math that can be used to subtract the height of .slider from the height of .container?
As requested in the comments, here is additional markup, including only the container sections:
<section class="top-bar">
</section>
<section id="container">
</section>
<section class="slider-wrapper">
</section>
Those are the three containers that currently make up the layout of the screen. Here is the CSS for the #container:
#container {
background: url(../img/cafe-background.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
width: 100%;
height: 100%;
position: relative;
}
So, I just need to subtract the height of the .slider-wrapper from this container.