td widths when table width is 100%

I need clarification on how the table cell widths should be calculated when you are using percentages. <br />
<br />
Until now I have always calculated my cell widths so that their combined value equals the value of the table width.<br />
<br />
ie. <br />
<br />
<table width = "80%"><tr><br />
<td width = "50%"><br />
<td width ="30%"><br />
<tr></table><br />
<br />
However, recently I was challenged on this and it was suggested that the combined value of the table cell widths should always equal 100% and it is only the table width percentage that needs to be changed. <br />
<br />
<table width="80%"><br />
<td width = "63%"><br />
<td width ="37%"><br />
<tr></table><br />
<br />
<br />
Although I know this method can work, I'm not sure if its "good" code and I thought what I was doing was correct.<br />
Please could someone clarify.<br />
<br />
Any help appreciated.<br />
<br />
Regards, <br />
<br />
JsLady<!--content-->The second way is correct because it is using the percentage of what tag it is in. Just like the <table> tag is going off of the <body> tag's size, the <td> tag is using a percentage of what the <table> tag is. If the <table> tag is 80% wide, and the <td> tag is 50% wide, the <td> tag is actually 40% of the the <body> tag.<!--content-->thanks for that spufi. <br />
<br />
Regards, <br />
<br />
JsLady<!--content-->
 
Back
Top