I want to fix my footer at the bottom gap. If content is less footer is coming up and content full problem solved and the footer should fix at bottom while I will zoom in or zoom out. But when I zoom the footer will go to content part
<head runat="server">
<asp:contentplaceholder id="HeaderContent" runat="server"></asp:contentplaceholder>
</head>
<body class="hidden-sn white-skin backcolor">
<form id="form1" runat="server">
<main>
<asp:contentplaceholder id="ContentPlaceHolder1" runat="server"></asp:contentplaceholder>
</main>
<!--main layout-->
<!--footer-->
<footer id="footer" style="position:relative;bottom: 0;left: 0;width: 100%; height: 50px;text-align: center; color: rgba(255, 255, 255, 0.6); line-height: 50px; overflow: hidden; font-size: 0.9rem; background-color: rgba(62, 69, 81, 0.3)">
<div class="footer-copyright">
<div class="container-fluid">
© copyright 2016 transgraph consulting pvt.ltd, all rights reserved.
</div>
</div>
</footer>
</body>
</html>
This is my master page.
position: relative ---> if content is less coming up.
position: absolute and fixed ----> if content is more getting on content.
var docHeight = $(window).height();
var footerHeight = $('#footer').height();
var footerTop = $('#footer').position().top + footerHeight;
if (footerTop < docHeight) {
$('#footer').css('margin-top', 0 + (docHeight - footerTop) + 'px');
}
I used jQuery to fix it. fix my footer at the bottom. Suggest me to solve this problem using CSS or jQuery.I want to fix my footer at the bottom gap. If content is less footer is coming up and content full problem solved and the footer should fix at bottom while I will zoom in or zoom out. But when I zoom the footer will go to content part