Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap 3 - Bottom align column within row

I have two Bootstrap columns within a row, thusly:

<div class="row">
    <div class="col-xs-6 mainBox">
        <h1>Heading</h1>
        <h2>Sub Heading</h2>
    </div>
    <div class="col-xs-6 mainBox buttonBox">
        <button class="btn btn-primary">Button</button>
    </div>
</div>

I want the second column to be bottom aligned vertically within the row. How do I achieve this?

Here is a demo fiddle:
http://jsfiddle.net/RationalGeek/6pYhx/

like image 668
RationalGeek Avatar asked Feb 07 '14 14:02

RationalGeek


1 Answers

Try using position: absolute; and setting a bottom of 0:

.row {
    position: relative;
}
.mainBox {
    border: solid thin black;
}    
.buttonBox {
    position: absolute;
    bottom:0;
    right:0;
}

http://jsfiddle.net/6pYhx/3/

like image 143
Xareyo Avatar answered Oct 29 '22 22:10

Xareyo