我的HtmlTable中有一行只包含一个“OR”字符串/标签/ LiteralControl。我希望它比其他行短,以直观地指示上面和下面的行是同义词(你可以填写上面的行或下面的行),并尝试了几件事(注释掉):
// Create Row 5
var row5 = new HtmlTableRow();
//dynamicTable.Rows[4].Height = 12; // cannot implicitly convert int to str
//dynamicTable.Rows[4].Height = 12.ToString(); <= crash-o-rama
//row5.Height = 6; <= 'cannot convert int to string'
//row5.Height = "2cm"; // <= runs, but doesn't help
row5.Height = "2em"; // <= runs, but doesn't help
var cell5_1 = new HtmlTableCell();
row5.Cells.Add(cell5_1);
// Populate Row 5
LiteralControl orStr = new LiteralControl(" OR");
cell5_1.Controls.Add(orStr);
dynamicTable.Rows.Add(row5);
......并且它们都不起作用 - 无论如何,行保持相同的高度。我怎么能把它压扁一点?