html - Responsive table with PHP -


i have table, supposed responsive. have little php script inside table. when try usual way of making responsive, isn't. use wrap div svaztymy supposed work overflow container.

<div class="svaztymy">     <table>         <tr>             <th colspan="9">1. národní hokejbalová liga 2014/2015</th>         </tr>       <tr>         <td width="39" height="19">pořadí</td>         <td width="394" height="19">mužstvo</td>         <td width="58" height="19">z</td>         <td width="58" height="19">v</td>         <td width="59" height="19">vp</td>         <td width="59" height="19">r</td>         <td width="59" height="19">p</td>         <td width="59" height="19">s</td>         <td width="59" height="19">b</td>       </tr>                     <?php             // put code here          $xml = simplexml_load_file('http://hokejbal.cz/xml/2014-2015/tables/177.xml');         foreach($xml->skupina $skupina){             if($skupina['id_sku'] != 1164) continue;             foreach($skupina->tym $tym){                 ?>                   <tr <?php if($tym['kod_cmshb']==3202007){ ?> class="beroun" <?php } ?>>                     <td><?=$tym["poradi"] ?>.</td>                     <td><?=$tym["nazev"] ?></td>                     <td><?=$tym->z ?></td>                     <td><?=$tym->v ?></td>                     <td><?=$tym->vp ?></td>                     <td><?=$tym->r ?></td>                     <td><?=$tym->p ?></td>                     <td><?=$tym->gh ?>:<?=$tym->ga ?></td>                     <td><?=$tym->body ?></td>                   </tr>                         <?php             }             break;         }      ?>     </table>         <p>data převzata z <a href="http://hokejbal.cz"> hokejbal.cz</a></p>      </div> 

css:

/*tabulky tymy*/  .svaztymy {     overflow: auto;     padding:10px;  }  .svaztymy  td{     border: 1px solid black;     padding: 5 }   .svaztymy tr:nth-child(even) {     background: #006eb9;     color:#fff;} .svaztymy table tr:nth-child(1) td {     font-weight : bolder;}     .svaztymy tr:nth-child(odd) {background: #fff}  .svaztymy table tr:nth-child(10) td {     border-bottom : 3px solid red;}  .svaztymy tr.beroun {     background-color: #825f5f; } 

i have tried width:100%, didnt work well. kind of lost. can please me? thank you


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -