I have this structure and I can not change it, I can only make changes to the CSS and I do not have permission to use flex.
The idea is to verticaly align text with different font-sizes and present in different containers.
.wrap {
display: table;
}
.container a {
background-color: #cecece;
line-height: normal;
text-decoration: none;
font-size: 100px;
padding: 10px;
display: table-cell;
vertical-align: middle;
}
.container a span {
vertical-align: middle;
}
.before::before {
content: "1-xyZ";
font-size: 50px;
color: red;
vertical-align: middle;
}
<div class="wrap">
<div class="container">
<a href="#">
<span class="before"></span>
<span>2-xyZ</span>
</a>
</div>
</div>
the problem is that regardless of the font-size
of "1-xyZ" or "2-xyZ" I need these aligned vertically center.