css - Place text to the bottom instead of right below the other text -


i'm using different div tags act tables , want div @ bottom of content div.

<div class="table">     <div class="table-row">          <div class="table-information">             content         </div>          <div class="table-content">             more content              <div class="extra">                 here's content             </div>         </div>      </div> </div> 

here's css:

.table {     display: table; }  .table-row {     display: table-row; }  .table-information {     background-color: #eaeaea;     height: 150px;     padding: 10px 15px;     width: 150px; }  .table-content {     display: table-cell;     height: 150px;     padding: 10px 15px; }  .extra {     vertical-align: bottom } 

as can see have vertical-align: bottom; extra class. want have content within div @ bottom , not right below text more content. nothing happens when i'm trying solution.

http://jsfiddle.net/edgren/3jjbv/

how can solve problem?

thanks in advance.

here 1 way achieve that

.table-content {     display: table-cell;     height: 150px;     padding: 10px 15px;     position:relative;     width:150px; } .extra {     vertical-align: bottom;     bottom:0;     position:absolute; } 

i adding relative position container table-content , absolute positioning bottom extra.
here fiddle


another way this:

.extra {     vertical-align: bottom;     display:table-cell;     height: 150px;     width:150px; }  

here fiddle 2nd option.
these 2 options go 1st one, should careful fixed widths , heights (because of absolute positioning).


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -