Foxseiz Foxseiz - 1 month ago 8
HTML Question

How to add border on table cells, but not the whole table on html?

I'm trying to add a border on table cells but I cannot figure out how to do it with rowspan.

I want a table that has 4 cells
1 big cell on the left and 3 small cells on the right of the big one.

here's the code I used

jsfiddle[dot]net/1fv4dz5g/3/

Answer

This can be done using CSS. Check this css sample

td {
  border: 1px solid black;
}
<table class="tnews-side" border="0">

<tr>
<td rowspan="3">
<table border="1" cellpadding="4" cellspacing ="0">Row 1 Cell 1</table>
</td>
  <td>Row 1 Cell 2</td>
</tr>
<tr>
  <td>Row 2 Cell 2</td>
</tr>
<tr>
  <td>Row 2 Cell 2</td>
</tr>
</table>