Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Align div to bottom of the page in bootstrap

I tried to use methods from stack questions, but nothing works for me, despite project is very simple.

<div class="fluid-container">
    <div id="app-row" class="row">
        <div id="app" class="col-xs-5">
            <div class="top-navbar">
            Top
            </div>
            <div class="bottom-navbar">
            Bottom
            </div>
        </div>
        <div id="map-container" class="col-xs-7">
            <div id="map"></div>
        </div>
    </div>
</div>

style.css

.fluid-container {
    margin: 0 0 0 0 !important;
    padding: 0 0 0 0 !important;
    width: 100%;
}

.row {
    margin: 0 0 0 0 !important;
    padding: 0 0 0 0 !important;
    width: 100%;
}

html, body, .fluid-container, #app-row, #map-container {
    height: 100%
}

#app-row {
    margin: 0 0 0 0 !important;
    padding: 0 0 0 0 !important;
}

#map-container {
    margin: 0 0 0 0 !important;
    padding: 0 0 0 0 !important;
}

#map {
    height: 100%;
    width: 100%;
}

What I want to achieve:

Bottom is bottom of the page and Top is on the top of the page.

like image 265
Nominalista Avatar asked Dec 26 '15 10:12

Nominalista


2 Answers

Try using navbar-fixed-bottom:

<div class="navbar navbar-default navbar-fixed-bottom">
    <div class="container">
         My footer
    </div>
</div>
like image 104
AngularBoy Avatar answered Sep 22 '22 22:09

AngularBoy


Just use position:fixedon both div.

Here a fiddle

like image 26
Core972 Avatar answered Sep 20 '22 22:09

Core972