html - <tr> inside <td> not displayed properly -
can tell me why internal rows not coming inside td.
<tr id="group_1_id"> <th>group 1</th> <td> <tr id="1"><td>1</td><td>one</td><td><input type="text" name="one" value="one"/></td></tr> <tr id="2"><td>2</td><td>two</td><td><input type="text" name="two" value="two"/></td></tr> <tr id="3"><td>3</td><td>three</td><td><input type="text" name="three" value="three"/></td></tr> </td> </tr> the 3 table rows comes outside parent tr. though defined inside td of parent tr.
thanks in advance
i html not correct. if want header section, use <thead> or <tbody> element, not <th>. believe problems emerged fact have used <th> instead of <thead>.
you may want use validator check whether html correct. upload page http://validator.w3.org example, , correct errors shows you.
also check specification (for example on www.whatwg.org) because suppose wanted create more 1 header section in table. table may have not more 1 <thead>, not more 1 <tfoot>, , number of <tbody> elements.
oh, have reedited question, problem same :)
a <tr> element cannot placed inside <td> or <th>. when code parsed, nested table automagically created, real html looks this:
<tr id="group_1_id"> <th>group 1</th> <td> <table> <tbody> <tr id="1"><td>1</td><td>one</td><td><input type="text" name="one" value="one"/></td></tr> <tr id="2"><td>2</td><td>two</td><td><input type="text" name="two" value="two"/></td></tr> <tr id="3"><td>3</td><td>three</td><td><input type="text" name="three" value="three"/></td></tr> </tbody> </table> </td> </tr>
Comments
Post a Comment