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>
expected result
maybe can use width: 100% , display: table on .column
.column { width: 100%; background-color: green; display: table; }
Comments
Post a Comment