Working with HTML
<table cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td>
<img src="...">
</td>
</tr>
</tbody>
</table>
Applying CSS
rules
* {
border: none;
margin: 0;
padding: 0;
}
table {
position: absolute;
left: 50%;
top: 50%;
width: 110px;
height: 92px;
margin-left: -55px;
margin-top: -46px;
}
img {
width: 110px;
height: 92px;
}
Check out the code in this fiddle,
After setting no margins, paddings, or borders on the table content, an discrepancy is noticed between the table and image heights. The issue seems to stem from the td
element.
What could be causing this misalignment? Is it a styling problem or an HTML issue?