I would like to know if there is any way to get border for a cell in a table when no data is present in the cell without using nbsp; in the TD tag.
For all cells in first column, i'm using nbsp; at the end of the data. Here is the code i'm using (i'm removing & before nbsp; because it doesn't show up in the Preview Post
So, please add & before nbsp; when actally using it in a .html file):
<Table border="1" >
<Tbody>
<TR>
<TD width="150" valign="middle">Some data in column 1, row 1 here. nbsp;</TD>
<TD width="150" valign="middle">Some data in cell 2 here.</TD>
</TR>
<TR>
<TD width="150" valign="middle">Data in cell 3 here. nbsp;</TD>
<TD width="150" valign="middle">Some data in cell 4 here.</TD>
</TR>
<TR>
<TD width="150" valign="middle">Some data in cell 5 here. nbsp;</TD>
<TD width="150" valign="middle">Some data in cell 6 here.</TD>
</TR>
<TR>
<TD width="150" valign="middle">nbsp;</TD>
<TD width="150" valign="middle">Some data in cell 8 here.</TD>
</TR>
</Tbody>
</Table>
If i dont use nbsp; in the first column of fourth row, i will not get a border for that cell. But if i use nbsp; to get a border, i'm losing "middle" vertical alignment in first column of third row.
Could anyone suggest a way to get a border without use of nbsp; by using CSS or any other way?
TIA
For all cells in first column, i'm using nbsp; at the end of the data. Here is the code i'm using (i'm removing & before nbsp; because it doesn't show up in the Preview Post
<Table border="1" >
<Tbody>
<TR>
<TD width="150" valign="middle">Some data in column 1, row 1 here. nbsp;</TD>
<TD width="150" valign="middle">Some data in cell 2 here.</TD>
</TR>
<TR>
<TD width="150" valign="middle">Data in cell 3 here. nbsp;</TD>
<TD width="150" valign="middle">Some data in cell 4 here.</TD>
</TR>
<TR>
<TD width="150" valign="middle">Some data in cell 5 here. nbsp;</TD>
<TD width="150" valign="middle">Some data in cell 6 here.</TD>
</TR>
<TR>
<TD width="150" valign="middle">nbsp;</TD>
<TD width="150" valign="middle">Some data in cell 8 here.</TD>
</TR>
</Tbody>
</Table>
If i dont use nbsp; in the first column of fourth row, i will not get a border for that cell. But if i use nbsp; to get a border, i'm losing "middle" vertical alignment in first column of third row.
Could anyone suggest a way to get a border without use of nbsp; by using CSS or any other way?
TIA