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.
is there way align button bottom of row? achieve , keep responsive @ same time looks when screen smaller:
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 buttonposition: 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
Post a Comment