html - Expand table cell rendered as table row to fit table width using CSS -


html gets table data rendered each column being rendered table row .

i need extend cell end of table, how expand if td added part of table row without changing html purely css .

<table border="0" cellpadding="0" cellspacing="0" class="tablestyle">     <tr>         <td class="column">             sample 1         </td>         <td class="column">             sample 2         </td>         <td class="column">             sample 3         </td>         <td class="column">             sample 4         </td>     </tr> </table>  <style type="text/css">     .column     {         width: 25%;         background-color: green;         display: table-row;     }     .tablestyle     {         border: 1px solid red;         width: 100%;     } </style> 

enter image description here

expected result enter image description here

maybe can use width: 100% , display: table on .column

http://jsfiddle.net/p8ddc/2/

.column {     width: 100%;     background-color: green;     display: table; } 

Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -