css - How do I align the button to the bottom of the row/column in bootstrap? -


i have row 4 columns each heading , text. of columns have similar amount of text , push button in column down match rest of columns. 1 column has less text , doesn't push button down far enough.

enter image description here

is there way align button bottom of row? achieve , keep responsive @ same time looks when screen smaller:

enter image description here

this markup of page now:

<div class="container">   <div class="row">     <div class="col-md-3">       <h2>heading</h2>       <p>text here</p>       <p><a class="btn btn-default" href="#" role="button">view details >></a></p>     </div>     <div class="col-md-3">       <h2>heading</h2>       <p>text here</p>       <p><a class="btn btn-default" href="#" role="button">view details >></a></p>     </div>     <div class="col-md-3">       <h2>heading</h2>       <p>less text here</p>       <p><a class="btn btn-default more" href="#" role="button">view details >></a></p>     </div>     <div class="col-md-3">       <h2>heading</h2>       <p>text here</p>       <p><a class="btn btn-default" href="#" role="button">view details >></a></p>     </div>   </div> </div> 

there several ways can done:

  • give containers fixed height. not ideal in order nice have set different heights each of breakpoints.
    need set button position: absolute, bottom: 0 , add bottom padding/margin.

  • use javascript match heights using match height. need set positions in previous point.

  • add additional row , repeat buttons within 4 new cols. show or hide original buttons , new ones using bootstraps responsive classes.


Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -