ok i couldnt help it - i created a flexbox version no more floats or absolute positioning
http://toddheymandirector.com/reel/index_flex.html
how do i make the footer position 'static' once it gets near to the images and then fixed once it is a certain distance away from the images?
Just as a simple example of what you would like to happen have a play around with the code below. Once the 'slide up' footer gets to the thumbnail boxes, by way of a user resizing the depth of the browser window, its position is rendered as 'static' which will put it in the normal flow of the code, which means it will not overlap the thumbnails. If you then increase the depth of the browser window the footer will render as 'fixed' which means it will stick to the bottom of the browser window.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Sticky Footer</title>
<style>
* {
box-sizing: border-box;
}
body {
margin: 0;
}
.header-main {
width: 90%;
margin: 0 auto;
}
.header {
text-align: center;
padding: 40px 0;
}
.main {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
width: 100%;
max-width: 1200px;
margin: 0 auto;
text-align: center;
}
.thumbnail {
display: flex;
justify-content: center;
align-items: center;
width: 32%;
background-color: #f2f2f2;
margin: 0 0 30px 0;
height: 230px;
}
.footer {
position: fixed;
bottom: 0;
width: 100%;
transform: translateY(100%);
transition: all .75s ease;
text-align: center;
padding: 15px 0;
}
.slideUp {
transform: translateY(0);
}
.static {
position: static;
}
</style>
</head>
<body>
<section class="header-main">
<header class="header">
LOGO/NAV
</header>
<section class="main">
<div class="thumbnail">
<span>THUMBNAIL</span>
</div>
<div class="thumbnail">
<span>THUMBNAIL</span>
</div>
<div class="thumbnail">
<span>THUMBNAIL</span>
</div>
<div class="thumbnail">
<span>THUMBNAIL</span>
</div>
<div class="thumbnail">
<span>THUMBNAIL</span>
</div>
<div class="thumbnail">
<span>THUMBNAIL</span>
</div>
</section>
<!-- end main -->
</section>
<!-- end header-main -->
<footer class="footer">
FOOTER
</footer>
<!-- end footer -->
<script>
const footer = document.querySelector('.footer');
const headerMain = document.querySelector('.header-main');
const headerMainHeight = headerMain.offsetHeight;
setTimeout(function() {
footer.classList.add('slideUp');
}, 1000)
window.addEventListener('resize', function() {
const distanceToTop = footer.getBoundingClientRect().top;
if(distanceToTop < headerMainHeight) {
footer.classList.add('static');
}
});
window.addEventListener('resize', function() {
const distanceToBottom = window.innerHeight - footer.offsetTop
if(distanceToBottom > 10) {
footer.classList.remove('static');
}
});
</script>
</body>
</html>