I am currently facing an issue with a table that has a background image.
I want the background image to span 100% of the width of the div container and automatically adjust its height while maintaining its aspect ratio.
#pitch{
background-color: d9ffd9;
background:url('https://conceptdraw.com/a2048c3/p1/preview/640/pict--sport-field-plan-template-sport-field-plan---template.png--diagram-flowchart-example.png');
background-position: top center;
background-repeat: no-repeat;
background-size: 100%,100%;
}
<div id="pitch-container">
<table id="pitch" width="100%">
<tr>
<td><img class="player-icon" src="https://www.freeiconspng.com/minicovers/sports-football-2-icon-12.png"><br>Player</td>
</tr>
</table>
</div>
Output: