Today found that even if the TD, th width set table, is still used, is based on the table's TD content to adapt to the width, resulting in other th, TD lost.
- is the browser-rendered table that causes the missing port column because the TD content in device name is too long. Code:
<Tablewidth= "100%"Border= "0"cellspacing= "0"cellpadding= "0"class= "Table1"ID= "Dvrequipnet"> <TR> <thScope= "Col" width= "15%"> Device ID</th> <thScope= "Col" width= "15%"> Management Server ID</th> <thScope= "Col" width= "15%"> Device Name</th> <thScope= "Col" width= "15%"> Ports</th> </TR> <ScriptID= "Test"type= "text/html">{Each data as value I}}<TR class="_acctr"> <TD>{{value.id}}</td> <TD>{{Value.sid}}</td> <TD>{{Value.name}}</td> <TD>{{value.subaddr}}</td> </tr> {{/Each }} </Script> </Table>
- Properties of CSS beyond Hiding (overflow:hidden;), forcing the display on the same line (white-space:nowrap;), ellipsis (text-overflow:ellipsis;), the light has these is not possible, To set the maximum width of the TD (Max-width:30px), and add Tilte properties, you can see the hidden contents of the mouse when it is placed.
{ overflow:hidden; white-space:nowrap; text-overflow:ellipsis; max-width: 30px;}
{Each data as value I}}<TRclass= "_acctr"> <TD>{{Value.id}}</TD> <TD>{{Value.sid}}</TD> <TDtitle= "{{value.name}}">{{Value.name}}</TD> <TD>{{VALUE.SUBADDR}}</TD> </TR>
{{/each}}
CSS controls the TD width of table