html - How can I place column content on the bottom? -


i have row 3 columns 1 of has 2 buttons. button row should placed on bottom of column. question how this? in advance.

jsfiddle

<div class="container">     <div class="row">          <div class="col-xs-4">           needed insert text place on multiple rows         </div>          <div class="col-xs-4">            <a class="btn btn-default">             button           </a>            <a class="btn btn-default">             button           </a>          </div>          <div class="col-xs-4">           needed insert text place on multiple rows         </div>      </div>  </div> 

enter image description here

the problem elements float don't have fixed height, cannot position @ bottom.

that's why have transform table container, , transform columns table-cells apply vertical-align:bottom. see code bellow:

<!doctype html>  <html>    <head>    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />          		<style>  			.container {  				display: table;  				width: 100%;  			}  			  			.row{  				display:table-row;  			}  			  			.cell{  				display:table-cell;  				float:none;  			}  			  			.cell-bottom{  				vertical-align: bottom;  			}  		</style>      </head>    <body>    <div class="container">      <div class="row">          <div class="col-xs-4 cell">          lorem ipsum dolor sit amet, consectetur adipiscing elit, sed eiusmod tempor incididunt ut labore et dolore magna aliqua. ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. duis aute irure dolor          in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur        </div>          <div class="col-xs-4 cell cell-bottom">            <a class="btn btn-default">              button            </a>            <a class="btn btn-default">              button            </a>          </div>          <div class="col-xs-4 cell">          lorem ipsum dolor sit amet, consectetur adipiscing elit, sed eiusmod tempor incididunt ut labore et dolore magna aliqua. ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. duis aute irure dolor          in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur        </div>        </div>      </div>  </body>    </html>


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -