css - 'Float' right a column when using display: table? -


im using display table 3 column section of site. im doing need vertically center content of first column.

how can move third column right while still keeping text left aligned?

enter image description here

<span class="cont">   <span class="one">one</span>   <span class="two">one</span>   <span class="three">     <div class="a">some text , a</div>     <div class="b">some more text , b</div>   </span> </span>  .cont {   display: table;   border: 1px solid black;   width: 100%; } .one, .two, .three {   display: table-cell; } .one {   background: grey;   vertical-align: middle; } .two {   background: green; } 

http://codepen.io/anon/pen/azbmrp

one simple solution use float: right .three class , vertical-align: top .two class:

.cont {    display: table;    border: 1px solid black;    width: 100%;  }  .one,  .two,  .three {    display: table-cell;  }  .one {    background: grey;    vertical-align: middle;  }  .two {    background: green;    vertical-align: top;  }  .three {    float: right;  }
<span class="cont">    <span class="one">one</span>  <span class="two">one</span>  <span class="three">      <div class="a">some text , a</div>      <div class="b">some more text , b</div>    </span>  </span>


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -