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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

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

android - How to create dynamically Fragment pager adapter -