Reputation: 6252
I want to leave out the footer of the height of the page such as Google Chrome does when you download a file. My page looks like this:
And I want to keep out of scrolling just like:
This is the code of my footer:
<footer class="tr-emulate">
<div class="float-left" style="margin-left: 5px; padding-top: 8px;">
<button class="k-button" onclick="javascript:document.getElementById('logoutForm').submit();">Cerrar sesión: @User.Identity.Name</button>
</div>
<div class="float-right" style="margin-right: 5px; padding-top: 12px;">© @DateTime.Now.Year - DirecTV </div>
</footer>
and this is the CSS style of the tag:
footer {
clear: both;
background-color: #e2e2e2;
font-size: .8em;
text-align: left;
width: 100%;
bottom: 0;
position: fixed;
height: 37px;
}
How can I do that?
Upvotes: 1
Views: 76
Reputation: 103810
This should get you on the right path:
HTML:
<div id="wrap">
<div id="content"></div>
</div>
<footer></footer>
CSS:
body, html{
width:100%;
height:100%;
margin:0;
padding:0;
}
#wrap{
height:90%;
width:100%;
overflow:auto;
}
#content{
height:300%;
width:100%;
background:green;
}
footer{
width:100%;
height:10%;
position:fixed;
bottom:0;
left:0;
background:red;
}
Upvotes: 2