I attempted to create a React page that is compatible with both mobile and web views. I included icons for non-veg and veg symbols in a table for rendering data. However, when viewed on screens of different sizes, the non-veg icon appears larger than the veg icon. Does anyone have any solutions for this issue?
Appearance on small sized screen:
https://i.sstatic.net/wN7vE.png
Appearance on medium sized screen:
https://i.sstatic.net/wN7vE.png
On a large size screen:
https://i.sstatic.net/0xtYq.png
This is my react HTML code:
<thead className='DVthead'>
<tr className='DVtr'>
<th className='DVth'>Food</th>
<th className='DVth'><img src="https://user-images.githubusercontent.com/74299799/210125736-3e021162-9217-4f6c-9d61-f9aceaa6e468.svg" alt='NON-VEG' /></th>
<th className='DVth'><img src="https://user-images.githubusercontent.com/74299799/210125735-9d1831f4-28e3-4a8a-885a-0493de559372.svg" alt='VEG' /></th>
<th className='DVth'>Total</th>
</tr>
</thead>
CSS:
.DVtd, .DVth {
border: 1px solid #ddd;
padding: 20px;
}
.DVtr{
color: #ffffff;
border: 1px solid white;
text-align: center;
}
.DVth {
padding-top: 10px;
padding-bottom: 10px;
text-align: left;
background-color: #ffffff;
color: rgb(0, 0, 0);
}
.DVth img {
border-radius: 0px;
width: 100%;
image-rendering: pixelated;
}
Your assistance would be greatly valued.