Here is the code I am working with:
td {
border: 1px solid #cecece;
position: relative;
padding: 80px 20px;
}
.hint {
background: yellow;
position: absolute;
top: 0;
bottom: 0;
left: 100px;
}
<table style="width:800px">
<tr>
<td width="50%">
<span>text</span>
<div class="hint">
<span class="recomendation">Some text with recommendation</span>
</div>
</td>
<td>
<span>text</span>
<div class="hint">
<span class="recomendation">Some text with recommendationSome text with recommendationSome text with recommendation</span>
</div>
</td>
</tr>
</table>
https://plnkr.co/edit/JVkXP3vNtIj4gzwwjm4B?p=preview
I am facing a challenge that I can't seem to resolve:
Is it possible to vertically center the yellow block? It is currently positioned at the top, but I want it to be centered without using line-height since its height is dynamic. Is there a way to achieve this alignment without JavaScript?