html - Aligning bottoms of divs to same level -


is there way comment divs bottom same level of buttons bottom line?

this how works. quick jsfiddle

.button_div {   width: 54px;   height: 20px;   float: left; }  .comments {   width: 320px;   margin-right: -100px;   height: 340px;   background-color: #818181;   float: left; }  .comment_cont {   float: right; } 

and how want look. accomplished negative top margin, approach don't work me, because height of comment div may change.

you can use display: flex align-items: flex-end on parent element.

.comments {    width: 320px;    height: 340px;    background-color: #818181;  }  .comment_cont {    float: right;    display: flex;    align-items: flex-end;  }
<div class="comment_cont">    <div class="button_div">      <button>button</button>    </div>    <div class="comments"></div>  </div>


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -