I have two pieces of code. I was expecting these to have the same result, but no luck. Can someone explain this to me?
<table border=1px>
<tr>
<td width=20%>test1</td>
<td width=80%>test2</td>
</tr>
</table>
<style>
table { width:100%;}
td.1 { width:20%; }
td.2 { width:80%; }
</style>
This works as I expect. The first column is 20%, the second is 80%.
<table border=1px>
<tr>
<td class="1">test1</td>
<td class="2">test2</td>
</tr>
</table>
<style>
table { width:100%;}
td.1 { width:20%; }
td.2 { width:80%; }
</style>
This version shows column as 50/50.