html - 2 Table but different width -


i want make table header , table data. facing problem width on 2 tables different.

here example table :

<table> <tr> <td>name</td> <td>class</td> <td>phone</td> </tr> </table> 

and data here :

<table> <tr> <td>john reise</td> <td>math</td> <td>123456789</td> <tr> <td>michael sweirzgez</td> <td>information technology</td> <td>012345678910</td> <tr> 

so when try run code, :

name | class | phone john reise | math | 123456789 

if delete data, width fit table header.

i make 2 table, 1 table header , 1 table data cause want marquee data. table header keep stay in top.

maybe better use thead , tbody tags?

<table>     <thead>         <tr>             <td>name</td>             <td>class</td>             <td>phone</td>         </tr>     </thead>     <tbody>         <tr>             <td>john reise</td>             <td>math</td>             <td>123456789</td>         </tr>         <tr>             <td>michael sweirzgez</td>             <td>information technology</td>             <td>012345678910</td>         </tr>     </tbody> </table> 

you can read more here http://www.w3schools.com/tags/tag_thead.asp


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -