Ahmadali Shafiee
Ahmadali Shafiee

Reputation: 4657

Twitter BootStrap, Sticky footer and 100% height dive give the page extra unnecessary scroll

I'm using Twitter Bootstrap (RTL) with Sticky Footer and I have two columns in one row with 100% height. But when I open the page it has unnecessary scrollbar and I don't know why.

You can see it in JSFiddle.

This is my HTML code:

<div class="container-fluid mainContainer">
    <div class="row-fluid full-height">
        <div class="span3 sidebar itemContainer full-height">
            <h2>ابزارهای در دست‌رس</h2>
            @ToolsList.GetToolsList(this, Model)
        </div>
        <div class="span9 main itemContainer full-height">
            <h2>بدنه</h2>
        </div>
    </div>
    <div class="push"></div>
</div>
<footer class="footer itemContainer">
    <div class="container">
        <div class="row">
            <div class="span12">
                توسط احمدعلی شفیعی
            </div>
        </div>
    </div>
</footer>

and This is my css StyleSheet (beside bootstrap's default code)

* {
    font-family: Tahoma;
    font-weight: 100;
    margin: 0;
}

html, body {
    height: 100%;
}

.sidebar {
    border: 1px solid #C0C0C0;
    padding: 5px;
    margin-top: 10px;
}

.main {
    border: 1px solid #C8C8C8;
    padding: 5px;
    margin-top: 10px;
    padding-top: 70px;
    padding-right: 25px;
}

.full-height {
    height: 100%;
    min-height: 100%;
}

.itemContainer {
    background-color: #F5F5F5;
}

.mainContainer {
    min-height: 100%;
    height: 100%;
    margin: 0 auto -40px;
}

.ToolItem {
    margin-right: 20px;
}

.footer, .push {
    clear: both;
    height: 30px;
}

.footer {
    margin: 5px;
    margin-top: 60px;
    padding-top: 5px;
}

Upvotes: 0

Views: 4221

Answers (1)

SaurabhLP
SaurabhLP

Reputation: 3657

from your description i think you want a sticky footer and a height 100% screen...

Check the documnetation and examples on Twitter Bootstrap:-

http://twitter.github.io/bootstrap/getting-started.html#examples

Their is an example for a sticky footer:-

http://twitter.github.io/bootstrap/examples/sticky-footer.html

For this you have to download the documentations of Twitter Bootstrap:-

http://twitter.github.io/bootstrap/index.html

Hope this works for you... Thanks...

Upvotes: 2

Related Questions