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

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -