css - How to limit the number of items per table row? -


table shows large number of items per row goes beyond screen. tried add css style modify table width didn't work.

i thought putting break line after definite number(maybe using jquery) of items while create each row in iterative mode. there way define number of items created dynamically in each table row?

thanks,

you must modify table header width, child row/td inherit size :

<table>     <thead>         <tr>             <th width="20%">column 1</th>             <th width="20%">column 2</th>             <th width="20%">column 3</th>             <th width="20%">column 4</th>             <th width="20%">column 5</th>     </thead>     <tbody>         <tr>             <td>data column 1</td>             <td>data column 2</td>             <td>data column 3</td>             <td>data column 4</td>             <td>data column 5</td>         </tr>     </tbody> </table> 

note: must have same number of columns in both <thead> , <tbody>


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -