This is as far as I got. So far I am unable to vertically centre the icon in the right DIV regardless of the height. I am also unable to get the text in the left DIV to break when it hits it's max length.
Here is what I have: http://jsfiddle.net/SpSjL/1685/
both boxes should remain the same height, if there are a few lines of text in the left, the right should adjust as well
expected:
HTML:
<div class="container">
<div class="right">
<div class="someIcon"></div>
</div>
<div class="left">
aaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbcccdcccccccccccccccccccccccccccccdccccccccddccccc
</div>
</div>
CSS:
.left {
overflow: hidden;
border: 1px solid #FF0000;
/* word-wrap: break-word;
word-break: break-all;
text-wrap: normal;
white-space: normal;*/
word-break: break-all;
}
.container {
display: block;
position: relative;
overflow: hidden;
}
.someIcon {
background: url(http://www.adiumxtras.com/images/thumbs/adiumtwit_twitters_icon_for_adium_1_31971_7892_thumb.png);
background-size: 20px;
width: 20px;
height: 20px;
margin: 0 auto;
position: absolute;
top: 50%:
}
.right {
float: right;
width: 50px;
min-height: 50px;
border: 1px solid #000000;
display:table-cell;
vertical-align:middle;
}