css - Different TD widths within same width TR -


i have table want modify. there 2 rows , 2 columns on each row. first row has 2 cells first cell has 70% of width , second cell has 30% of parent table.. second row has 2 cells first cell has 60% of width , second cell has 40% of parent table. though explicitly state widths, why second row absorb characteristics of first row?

here code. why not work way want to?

<!doctype html> <html> <body>  <table style="border:1px black;width:100%">   <tr>     <th>month</th>     <th>savings</th>   </tr>   <tr>     <td style="width:70%">january</td>     <td style="width:30%">$100</td>   </tr>     <td style="width:60%">feb</td>     <td style="width:40%">$100</td>   </tr> </table>  </body> </html> 

for first column (<td width="70%">) have set width=70% , in second row first column have set column width=60%.

note : in table highest column width automatically apply same column. in case first column of table 70% both rows if have use 60% second row first column.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -