In my ASP.NET application, I am facing an issue with table column widths not rendering as expected in the browser. Despite setting the column width to 100px, it appears as either 96px or 108px. The problem seems to be related to having a div
inside the th
tag. When I try to set the width of the div
to 100px, it overflows from the th
due to the actual rendered column width being 96px. Is there a solution to ensure that the column width remains exact?
<table border="0" cellpadding="1">
<tr>
<th align="center" width="100px">
<div style="width:100px;">PV#</div>
</th>
<th align="center" width="90px">
<div style="width:90px;">Date</div>
</th>
<th align="center" width="100px">
<div style="width:100px;">Payment Doc#</div>
</th>
<th align="center" width="410px">
<div style="width:410px;">SOA Payments</div>
</th>
<th align="center" width="100px">
<div style="width:100px;">Payment Made</div>
</th>
</tr>
</table>