I want to make my footer display always on the bottom of the page even when the content does not fill the page, but when the content fills the page i want it to display only when i scroll to the very bottom of the page. I was thinking to check if the page can be scrolled with JavaScript and if no I'll add a class to make footer fixed else if yes ill remove that class, but I don't know how to check that with JavaScript. The idea is, I want my footer fixed when I cant scroll ,and when I can scroll I don't want it fixed. How can I do that ? My footer HTML is :
<footer class="smallFooter">
<p> @EDUARDVALENTIN 2015 </p>
<a href="https://www.facebook.com/danadesignsartoria?fref=ufi"><img src="img/fb-logo.png" /></a>
<a href="#"><img src="img/instagram-logo.png" /></a>
<a href="https://www.youtube.com/channel/UCqe4oWvPuSP8kTL70V1P9Gg/feed"><img src="img/yt-logo.png" /></a>
<a href="https://twitter.com/SartoriaAsti"><img src="img/twitter-logo.png" /></a>
</footer>
And CSS:
.smallFooter{
bottom:0;
width:100%;
position:fixed;
height:35px;
background-color:#0E0E0E ;
}
.smallFooter p{
position:absolute;
display: inline-block;
box-sizing:border-box;
color:white;
font-size:10px;
float:left;
}
footer img{
width:25x;
height:25px;
display:inline-block;
float:right;
margin-right:3%;
padding-top:8px;
}