TD in the absence of content, the default is not to display the TD border, at this time the page is a blank, the user does not know there is actually a, and the page is messy, collected the next, summed up the following several solutions:
1. Add a space in the cell . Such<td> </td>
2, directly in the table this write: <table width="300" border="1" style="border-collapse:collapse;">
**border-collapse can only be collapse, although Border-collapse also has separate,inherit attributes. This way you can display the border, but it's depressing-it shows a thin border. Incidentally, separate and collapse.
Separate:separate: Default value. The border is independent (standard HTML), as shown when this property is not used. (Inherit in my opinion with separate no difference, maybe I cruel, hehe)
Collapse: Adjacent edges are merged
Adjacent edges are merged! By default, adjacent edges are not merged, so this is 1+1=2. Now we're using border-collapse:collapse to merge us, so the width is 1+1=1 and the hairline border appears.
3, table { caption-side: top; width: auto; border-collapse: collapse; empty-cells: hide; }
or
table {width:100%;border-collapse: separate;empty-cells:show;}
However, currently IE6.0 holds this attribute and appears to be only used in CSS2. The corresponding script attribute is emptycells.
4, <table cellspacing=2 border=1 rules="cols">
here can make the frame display the core is rules= "cols"
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Show border when no content in TD