<!DOCTYPE html>
<style>
.flex-item {
flex: 1 1 ;
}
</style>
<div style="display: flex">
<div class="flex-item">y</div>
<div class="flex-item">
<table>
<tr style="background-color: red">
<td>
x
</td>
</tr>
</table>
</div>
</div>