Here is the code I am working with:
<td class="mobile-user-icon">
<span class="mobile-photo">background text</span>
<span class="mobile-caller-mute">overlay text</span>
</td>
.mobile-user-icon {
width: 64px;
height: 64px;
text-align: center;
background: grey;
color: white;
vertical-align:middle;
}
I am trying to place mobile-caller
over mobile-photo
, all while keeping both aligned vertically using vertical-align:middle
.
In a regular layout, I would set the parent mobile-user-icon
to position:relative
and then absolutely position both child elements. However, this method does not work within a table-cell
. Any suggestions on how to achieve this?
Check out my attempt on JS Fiddle: http://jsfiddle.net/mFNed/1/