After searching through various questions on the topic, I have not found a working solution.
My goal is to hide the body content beneath a transparent fixed header when scrolled. Take a look at my current setup here: https://jsfiddle.net/nukuf23L/
If possible, I would like to achieve this using pure CSS, but I am open to JS/JQuery solutions as well.
Here is the structure of the HTML:
<div id="main">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div>
This is the accompanying CSS:
body {
margin: 0;
padding: 0;
background: url(http://etc.usf.edu/clipart/80100/80154/80154_grid_20_20_lg.gif) no-repeat center center fixed;
}
#header {
position: fixed;
z-index: 10;
background-color: rgba(0, 0, 0, .7);
width: 100%;
height: 70px;
}
#main {
background-color: rgba(255, 0, 0, .7);
height: 1000px;
position: relative;
top: 70px;
}